Documentation ¶
Index ¶
- func GetServicesStatus(services []swarm.Service, nodes []swarm.Node, tasks []swarm.Task) map[string]ListInfo
- func InspectFormatWrite(ctx formatter.Context, refs []string, getRef, getNetwork inspect.GetRefFunc) error
- func ListFormatWrite(ctx formatter.Context, services []swarm.Service, info map[string]ListInfo) error
- func NewFormat(source string) formatter.Format
- func NewListFormat(source string, quiet bool) formatter.Format
- func NewServiceCommand(dockerCli command.Cli) *cobra.Command
- func ParseConfigs(client client.ConfigAPIClient, requestedConfigs []*swarmtypes.ConfigReference) ([]*swarmtypes.ConfigReference, error)
- func ParseGenericResources(value []string) ([]swarm.GenericResource, error)
- func ParseSecrets(client client.SecretAPIClient, requestedSecrets []*swarmtypes.SecretReference) ([]*swarmtypes.SecretReference, error)
- func ValidateSingleGenericResource(val string) (string, error)
- type ListInfo
- type ShlexOpt
- type Uint64Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServicesStatus ¶
func GetServicesStatus(services []swarm.Service, nodes []swarm.Node, tasks []swarm.Task) map[string]ListInfo
GetServicesStatus returns a map of mode and replicas
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, info map[string]ListInfo) error
ListFormatWrite writes the context
func NewListFormat ¶
NewListFormat returns a Format for rendering using a service Context
func NewServiceCommand ¶
NewServiceCommand returns a cobra command for `service` subcommands
func ParseConfigs ¶
func ParseConfigs(client client.ConfigAPIClient, requestedConfigs []*swarmtypes.ConfigReference) ([]*swarmtypes.ConfigReference, error)
ParseConfigs retrieves the configs from the requested names and converts them to config references to use with the spec
func ParseGenericResources ¶
func ParseGenericResources(value []string) ([]swarm.GenericResource, error)
ParseGenericResources parses an array of Generic resourceResources Requesting Named Generic Resources for a service is not supported this is filtered here.
func ParseSecrets ¶
func ParseSecrets(client client.SecretAPIClient, requestedSecrets []*swarmtypes.SecretReference) ([]*swarmtypes.SecretReference, error)
ParseSecrets retrieves the secrets with the requested names and fills secret IDs into the secret references.
func ValidateSingleGenericResource ¶
ValidateSingleGenericResource validates that a single entry in the generic resource list is valid. i.e 'GPU=UID1' is valid however 'GPU:UID1' or 'UID1' isn't
Types ¶
type ShlexOpt ¶
type ShlexOpt []string
ShlexOpt is a flag Value which parses a string as a list of shell words