service

package
v26.1.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 48 Imported by: 590

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendServiceStatus

func AppendServiceStatus(ctx context.Context, c client.APIClient, services []swarm.Service) ([]swarm.Service, error)

AppendServiceStatus propagates the ServiceStatus field for "services".

If API version v1.41 or up is used, this information is already set by the daemon. On older API versions, we need to do some extra requests to get that information. Theoretically, this function can be skipped based on API version, however, some of our unit tests don't set the API version, and there may be other situations where the client uses the "default" version. To take these situations into account, we do a quick check for services that don't have ServiceStatus set, and perform a lookup for those.

func CompletionFn

func CompletionFn(dockerCli command.Cli) completion.ValidArgsFn

CompletionFn offers completion for swarm services

func InspectFormatWrite

func InspectFormatWrite(ctx formatter.Context, refs []string, getRef, getNetwork inspect.GetRefFunc) error

InspectFormatWrite renders the context for a list of services

func ListFormatWrite

func ListFormatWrite(ctx formatter.Context, services []swarm.Service) error

ListFormatWrite writes the context

func NewFormat

func NewFormat(source string) formatter.Format

NewFormat returns a Format for rendering using a Context

func NewListFormat

func NewListFormat(source string, quiet bool) formatter.Format

NewListFormat returns a Format for rendering using a service Context

func NewServiceCommand

func NewServiceCommand(dockerCli command.Cli) *cobra.Command

NewServiceCommand returns a cobra command for `service` subcommands

func ParseConfigs

func ParseConfigs(ctx context.Context, apiClient client.ConfigAPIClient, requestedConfigs []*