合并杂项功能服务器节点到multi服务器节点

This commit is contained in:
flswld committed 2023-10-22 19:46:08 +08:00
1 parent 64699c23d7
commit 6cca998915
42 files changed
+344 -647

No files matched your search

+1 -2
View File
@@ -25,9 +25,8 @@ func main() {
NodeCmd(),
DispatchCmd(),
GateCmd(),
AnticheatCmd(),
PathfindingCmd(),
GSCmd(),
MultiCmd(),
GMCmd(),
)
+4 -4
View File
@@ -3,17 +3,17 @@ package main
import (
"context"
"hk4e/anticheat/app"
"hk4e/multi/app"
"github.com/spf13/cobra"
)
func AnticheatCmd() *cobra.Command {
func MultiCmd() *cobra.Command {
var cfg string
app.APPVERSION = VERSION
c := &cobra.Command{
Use: "anticheat",
Short: "anticheat server",
Use: "multi",
Short: "multi server",
RunE: func(cmd *cobra.Command, args []string) error {
return app.Run(context.Background(), cfg)
},
-23
View File
@@ -1,23 +0,0 @@
package main
import (
"context"
"hk4e/pathfinding/app"
"github.com/spf13/cobra"
)
func PathfindingCmd() *cobra.Command {
var cfg string
app.APPVERSION = VERSION
c := &cobra.Command{
Use: "pathfinding",
Short: "pathfinding server",
RunE: func(cmd *cobra.Command, args []string) error {
return app.Run(context.Background(), cfg)
},
}
c.Flags().StringVar(&cfg, "config", "application.toml", "config file")
return c
}
File renamed without changes.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
_ "net/http/pprof"
"os"
"hk4e/anticheat/app"
"hk4e/multi/app"
"hk4e/pkg/statsviz_serve"
)
-8
View File
@@ -1,8 +0,0 @@
[logger]
level = "DEBUG"
mode = "CONSOLE"
track = true
max_size = 10485760
[mq]
nats_url = "nats://nats:4222"
-31
View File
@@ -1,31 +0,0 @@
package main
import (
"context"
"flag"
"fmt"
_ "net/http/pprof"
"os"
"hk4e/pathfinding/app"
"hk4e/pkg/statsviz_serve"
)
var (
config = flag.String("config", "application.toml", "config file")
)
var VERSION = "UNKNOWN"
func main() {
flag.Parse()
go func() {
_ = statsviz_serve.Serve("0.0.0.0:6789")
}()
app.APPVERSION = VERSION
err := app.Run(context.TODO(), *config)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}