Documentation ¶
Index ¶
- func ContainerToServiceName(containerNames []string, stackName string) string
- func GetService(c context.Context, cl *client.Client, filters filters.Args, prompt bool) (swarm.Service, error)
- func GetServiceByLabel(c context.Context, cl *client.Client, label string, prompt bool) (swarm.Service, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerToServiceName ¶
ContainerToServiceName converts a container name to a service name.
func GetService ¶
func GetService(c context.Context, cl *client.Client, filters filters.Args, prompt bool) (swarm.Service, error)
GetService retrieves a service container. If prompt is true and the retrievd count of service containers does not match 1, then a prompt is presented to let the user choose. A count of 0 is handled gracefully.
func GetServiceByLabel ¶
func GetServiceByLabel(c context.Context, cl *client.Client, label string, prompt bool) (swarm.Service, error)
GetService retrieves a service container based on a label. If prompt is true and the retrievd count of service containers does not match 1, then a prompt is presented to let the user choose. An error is returned when no service is found.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.