MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / ServerMain

Function ServerMain

rest/main.go:33–38  ·  view source on GitHub ↗

ServerMain is the main entry point of launching the Sync Gateway server; the main function directly calls this. It registers both signal and fatal panic handlers, does the initial setup and finally starts the server.

()

Source from the content-addressed store, hash-verified

31// function directly calls this. It registers both signal and fatal panic handlers,
32// does the initial setup and finally starts the server.
33func ServerMain() {
34 ctx := context.Background() // main context
35 if err := serverMain(ctx, os.Args); err != nil {
36 base.FatalfCtx(ctx, "Couldn't start Sync Gateway: %v", err)
37 }
38}
39
40// TODO: Pass ctx down into HTTP servers so that serverMain can be stopped.
41func serverMain(ctx context.Context, osArgs []string) error {

Callers 1

mainFunction · 0.92

Calls 2

FatalfCtxFunction · 0.92
serverMainFunction · 0.85

Tested by

no test coverage detected