MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / main

Function main

IceFireDB-PubSub/cmd/pubsub/main.go:31–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29)
30
31func main() {
32 app := cli.NewApp()
33 app.Name = "IceFireDB-PubSub"
34 app.Description = "IceFireDB-PubSub, easier to use P2P Events, support resp protocol."
35 app.Flags = []cli.Flag{
36 cli.StringFlag{
37 Name: "config,c",
38 Usage: "config file",
39 Required: false,
40 Value: "config/config.yaml",
41 },
42 }
43 app.Before = initConfig
44 app.Action = start
45 err := app.Run(os.Args)
46 if err != nil {
47 logrus.Errorf("failed to run application: %v", err)
48 os.Exit(1)
49 }
50}
51
52func start(c *cli.Context) error {
53 ctx, cancel := context.WithCancel(context.Background())

Callers

nothing calls this directly

Calls 2

RunMethod · 0.45
ExitMethod · 0.45

Tested by

no test coverage detected