Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = cli.Command{ Name: "service", ShortName: "s", Usage: "Service related sub-command", Subcommands: cli.Commands{ ListCommand, }, }
View Source
var ListCommand = cli.Command{ Name: "list", ShortName: "ls", Usage: "List services", ArgsUsage: "<service name>", Description: "list all services if no <service name> is given, otherwise, only list the given service", Flags: flags.DurationFlags, Before: interceptor.BeforeChain([]cli.BeforeFunc{ interceptor.DurationInterceptor, }), Action: func(ctx *cli.Context) error { end := ctx.String("end") start := ctx.String("start") step := ctx.Generic("step") var services []schema.Service if args := ctx.Args(); len(args) == 0 { services = client.Services(ctx, schema.Duration{ Start: start, End: end, Step: step.(*model.StepEnumValue).Selected, }) } else { service, _ := client.SearchService(ctx, args.First()) services = []schema.Service{service} } return display.Display(ctx, services) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.