service

package
v0.0.0-...-896ff57 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: Apache-2.0 Imports: 46 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 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(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

func ValidateSingleGenericResource(val string) (string, error)

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 ListInfo

type ListInfo struct {
	Mode     string
	Replicas string
}

ListInfo stores the information about mode and replicas to be used by template

type ShlexOpt

type ShlexOpt []string

ShlexOpt is a flag Value which parses a string as a list of shell words

func (*ShlexOpt) Set

func (s *ShlexOpt) Set(value string) error

Set the value

func (*ShlexOpt) String

func (s *ShlexOpt) String() string

func (*ShlexOpt) Type

func (s *ShlexOpt) Type() string

Type returns the tyep of the value

func (*ShlexOpt) Value

func (s *ShlexOpt) Value() []string

Value returns the value as a string slice

type Uint64Opt

type Uint64Opt struct {
	// contains filtered or unexported fields
}

Uint64Opt represents a uint64.

func (*Uint64Opt) Set

func (i *Uint64Opt) Set(s string) error

Set a new value on the option

func (*Uint64Opt) String

func (i *Uint64Opt) String() string

String returns a string repr of this option

func (*Uint64Opt) Type

func (i *Uint64Opt) Type() string

Type returns the type of this option, which will be displayed in `--help` output

func (*Uint64Opt) Value

func (i *Uint64Opt) Value() *uint64

Value returns the uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL