Documentation ¶
Index ¶
- func GetServicesStatus(services []swarm.Service, nodes []swarm.Node, tasks []swarm.Task) map[string]formatter.ServiceListInfo
- func NewServiceCommand(dockerCli *command.DockerCli) *cobra.Command
- func ParseSecrets(client client.SecretAPIClient, requestedSecrets []*swarmtypes.SecretReference) ([]*swarmtypes.SecretReference, error)
- type DurationOpt
- type PositiveDurationOpt
- 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]formatter.ServiceListInfo
GetServicesStatus returns a map of mode and replicas
func NewServiceCommand ¶
NewServiceCommand returns a cobra command for `service` subcommands
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.
Types ¶
type DurationOpt ¶
type DurationOpt struct {
// contains filtered or unexported fields
}
DurationOpt is an option type for time.Duration that uses a pointer. This allows us to get nil values outside, instead of defaulting to 0
func (*DurationOpt) String ¶
func (d *DurationOpt) String() string
String returns a string repr of this option
func (*DurationOpt) Type ¶
func (d *DurationOpt) Type() string
Type returns the type of this option, which will be displayed in `--help` output
func (*DurationOpt) Value ¶
func (d *DurationOpt) Value() *time.Duration
Value returns the time.Duration
type PositiveDurationOpt ¶
type PositiveDurationOpt struct {
DurationOpt
}
PositiveDurationOpt is an option type for time.Duration that uses a pointer. It bahave similarly to DurationOpt but only allows positive duration values.
func (*PositiveDurationOpt) Set ¶
func (d *PositiveDurationOpt) Set(s string) error
Set a new value on the option. Setting a negative duration value will cause an error to be returned.
type ShlexOpt ¶
type ShlexOpt []string
ShlexOpt is a flag Value which parses a string as a list of shell words