MCPcopy Create free account
hub / github.com/Azure/peerd / main

Function main

tests/cmd/main.go:19–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17)
18
19func main() {
20 args := &Arguments{}
21 arg.MustParse(args)
22
23 zerolog.SetGlobalLevel(zerolog.InfoLevel)
24 l := zerolog.New(os.Stdout).With().Timestamp().Str("node", pcontext.NodeName).Str("version", version).Logger()
25 ctx := l.WithContext(context.Background())
26
27 err := run(ctx, args)
28 if err != nil {
29 l.Error().Err(err).Msg("error")
30 os.Exit(1)
31 }
32
33 l.Info().Msg("shutdown")
34}
35
36func run(ctx context.Context, args *Arguments) error {
37 ctx, cancel := signal.NotifyContext(ctx, syscall.SIGTERM)

Callers

nothing calls this directly

Calls 1

runFunction · 0.70

Tested by

no test coverage detected