合并杂项功能服务器节点到multi服务器节点
This commit is contained in:
1 parent
64699c23d7
commit
6cca998915
42 files changed
+344
-647
No files matched your search
+1
-2
@@ -25,9 +25,8 @@ func main() {
|
||||
NodeCmd(),
|
||||
DispatchCmd(),
|
||||
GateCmd(),
|
||||
AnticheatCmd(),
|
||||
PathfindingCmd(),
|
||||
GSCmd(),
|
||||
MultiCmd(),
|
||||
GMCmd(),
|
||||
)
|
||||
|
||||
|
||||
@@ -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)
|
||||
},
|
||||
@@ -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.
@@ -7,7 +7,7 @@ import (
|
||||
_ "net/http/pprof"
|
||||
"os"
|
||||
|
||||
"hk4e/anticheat/app"
|
||||
"hk4e/multi/app"
|
||||
"hk4e/pkg/statsviz_serve"
|
||||
)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
[logger]
|
||||
level = "DEBUG"
|
||||
mode = "CONSOLE"
|
||||
track = true
|
||||
max_size = 10485760
|
||||
|
||||
[mq]
|
||||
nats_url = "nats://nats:4222"
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user