diff --git a/cmd/server/main.go b/cmd/server/main.go index a00c04131a0..e8d8154ed2c 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -111,7 +111,7 @@ func buildCLI() *cli.App { &cli.StringSliceFlag{ Name: "service", Aliases: []string{"svc"}, - Value: cli.NewStringSlice(temporal.Services...), + Value: cli.NewStringSlice(temporal.DefaultServices...), Usage: "service(s) to start", }, }, diff --git a/temporal/server.go b/temporal/server.go index e745c6751e1..f7b33e86e44 100644 --- a/temporal/server.go +++ b/temporal/server.go @@ -43,9 +43,9 @@ type ( } ) -// Services is the list of all valid temporal services as strings (needs to be strings to keep -// ServerOptions interface stable) var ( + // Services is the set of all valid temporal services as strings (needs to be strings to + // keep ServerOptions interface stable) Services = []string{ string(primitives.FrontendService), string(primitives.InternalFrontendService), @@ -53,6 +53,15 @@ var ( string(primitives.MatchingService), string(primitives.WorkerService), } + + // DefaultServices is the set of services to start by default if services are not given on + // the command line. + DefaultServices = []string{ + string(primitives.FrontendService), + string(primitives.HistoryService), + string(primitives.MatchingService), + string(primitives.WorkerService), + } ) // NewServer returns a new instance of server that serves one or many services.