Documentation ¶
Index ¶
- type DefaultStacksBackend
- func (b *DefaultStacksBackend) CreateConfig(s swarm.ConfigSpec) (string, error)
- func (b *DefaultStacksBackend) CreateNetwork(nc dockerTypes.NetworkCreateRequest) (string, error)
- func (b *DefaultStacksBackend) CreateSecret(s swarm.SecretSpec) (string, error)
- func (b *DefaultStacksBackend) CreateService(spec swarm.ServiceSpec, s string, bo bool) (*dockerTypes.ServiceCreateResponse, error)
- func (b *DefaultStacksBackend) CreateStack(stackSpec types.StackSpec) (types.StackCreateResponse, error)
- func (b *DefaultStacksBackend) DeleteStack(id string) error
- func (b *DefaultStacksBackend) GetConfig(id string) (swarm.Config, error)
- func (b *DefaultStacksBackend) GetConfigs(opts dockerTypes.ConfigListOptions) ([]swarm.Config, error)
- func (b *DefaultStacksBackend) GetNetwork(name string) (dockerTypes.NetworkResource, error)
- func (b *DefaultStacksBackend) GetNetworks(filter filters.Args) ([]dockerTypes.NetworkResource, error)
- func (b *DefaultStacksBackend) GetNetworksByName(name string) ([]dockerTypes.NetworkResource, error)
- func (b *DefaultStacksBackend) GetNode(id string) (swarm.Node, error)
- func (b *DefaultStacksBackend) GetSecret(id string) (swarm.Secret, error)
- func (b *DefaultStacksBackend) GetSecrets(opts dockerTypes.SecretListOptions) ([]swarm.Secret, error)
- func (b *DefaultStacksBackend) GetService(id string, insertDefaults bool) (swarm.Service, error)
- func (b *DefaultStacksBackend) GetServices(opts dockerTypes.ServiceListOptions) ([]swarm.Service, error)
- func (b *DefaultStacksBackend) GetSnapshotStack(id string) (interfaces.SnapshotStack, error)
- func (b *DefaultStacksBackend) GetStack(id string) (types.Stack, error)
- func (b *DefaultStacksBackend) GetTask(id string) (swarm.Task, error)
- func (b *DefaultStacksBackend) GetTasks(opts dockerTypes.TaskListOptions) ([]swarm.Task, error)
- func (b *DefaultStacksBackend) Info() swarm.Info
- func (b *DefaultStacksBackend) ListStacks() ([]types.Stack, error)
- func (b *DefaultStacksBackend) RemoveConfig(id string) error
- func (b *DefaultStacksBackend) RemoveNetwork(name string) error
- func (b *DefaultStacksBackend) RemoveSecret(id string) error
- func (b *DefaultStacksBackend) RemoveService(id string) error
- func (b *DefaultStacksBackend) SubscribeToEvents(since, until time.Time, ef filters.Args) ([]events.Message, chan interface{})
- func (b *DefaultStacksBackend) UnsubscribeFromEvents(events chan interface{})
- func (b *DefaultStacksBackend) UpdateConfig(id string, version uint64, spec swarm.ConfigSpec) error
- func (b *DefaultStacksBackend) UpdateSecret(id string, version uint64, spec swarm.SecretSpec) error
- func (b *DefaultStacksBackend) UpdateService(id string, version uint64, spec swarm.ServiceSpec, ...) (*dockerTypes.ServiceUpdateResponse, error)
- func (b *DefaultStacksBackend) UpdateStack(id string, spec types.StackSpec, version uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultStacksBackend ¶
type DefaultStacksBackend struct { // stackStore is the underlying CRUD store of stacks. interfaces.StackStore // Swarm*Backend provides access to swarmkit operations on secrets // and configs, required for stack validation and conversion. interfaces.SwarmResourceBackend interfaces.SwarmConfigBackend interfaces.SwarmServiceBackend interfaces.SwarmNetworkBackend interfaces.SwarmSecretBackend }
DefaultStacksBackend implements the interfaces.StacksBackend interface, which serves as the API handler for the Stacks APIs.
func NewDefaultStacksBackend ¶
func NewDefaultStacksBackend(stackStore interfaces.StackStore, swarmBackend interfaces.SwarmResourceBackend) *DefaultStacksBackend
NewDefaultStacksBackend creates a new DefaultStacksBackend.
func (*DefaultStacksBackend) CreateConfig ¶
func (b *DefaultStacksBackend) CreateConfig(s swarm.ConfigSpec) (string, error)
CreateConfig forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) CreateNetwork ¶
func (b *DefaultStacksBackend) CreateNetwork(nc dockerTypes.NetworkCreateRequest) (string, error)
CreateNetwork forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) CreateSecret ¶
func (b *DefaultStacksBackend) CreateSecret(s swarm.SecretSpec) (string, error)
CreateSecret forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) CreateService ¶
func (b *DefaultStacksBackend) CreateService(spec swarm.ServiceSpec, s string, bo bool) (*dockerTypes.ServiceCreateResponse, error)
CreateService forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) CreateStack ¶
func (b *DefaultStacksBackend) CreateStack(stackSpec types.StackSpec) (types.StackCreateResponse, error)
CreateStack creates a new stack if the stack is valid.
func (*DefaultStacksBackend) DeleteStack ¶
func (b *DefaultStacksBackend) DeleteStack(id string) error
DeleteStack deletes a stack.
func (*DefaultStacksBackend) GetConfig ¶
func (b *DefaultStacksBackend) GetConfig(id string) (swarm.Config, error)
GetConfig forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetConfigs ¶
func (b *DefaultStacksBackend) GetConfigs(opts dockerTypes.ConfigListOptions) ([]swarm.Config, error)
GetConfigs forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetNetwork ¶
func (b *DefaultStacksBackend) GetNetwork(name string) (dockerTypes.NetworkResource, error)
GetNetwork forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetNetworks ¶
func (b *DefaultStacksBackend) GetNetworks(filter filters.Args) ([]dockerTypes.NetworkResource, error)
GetNetworks forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetNetworksByName ¶
func (b *DefaultStacksBackend) GetNetworksByName(name string) ([]dockerTypes.NetworkResource, error)
GetNetworksByName forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetNode ¶
func (b *DefaultStacksBackend) GetNode(id string) (swarm.Node, error)
GetNode forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetSecret ¶
func (b *DefaultStacksBackend) GetSecret(id string) (swarm.Secret, error)
GetSecret forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetSecrets ¶
func (b *DefaultStacksBackend) GetSecrets(opts dockerTypes.SecretListOptions) ([]swarm.Secret, error)
GetSecrets forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetService ¶
GetService forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetServices ¶
func (b *DefaultStacksBackend) GetServices(opts dockerTypes.ServiceListOptions) ([]swarm.Service, error)
GetServices forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetSnapshotStack ¶
func (b *DefaultStacksBackend) GetSnapshotStack(id string) (interfaces.SnapshotStack, error)
GetSnapshotStack retrieves a snapshot stack by its ID.
func (*DefaultStacksBackend) GetStack ¶
func (b *DefaultStacksBackend) GetStack(id string) (types.Stack, error)
GetStack retrieves a stack by its ID.
func (*DefaultStacksBackend) GetTask ¶
func (b *DefaultStacksBackend) GetTask(id string) (swarm.Task, error)
GetTask forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) GetTasks ¶
func (b *DefaultStacksBackend) GetTasks(opts dockerTypes.TaskListOptions) ([]swarm.Task, error)
GetTasks forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) Info ¶
func (b *DefaultStacksBackend) Info() swarm.Info
Info forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) ListStacks ¶
func (b *DefaultStacksBackend) ListStacks() ([]types.Stack, error)
ListStacks lists all stacks.
func (*DefaultStacksBackend) RemoveConfig ¶
func (b *DefaultStacksBackend) RemoveConfig(id string) error
RemoveConfig forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) RemoveNetwork ¶
func (b *DefaultStacksBackend) RemoveNetwork(name string) error
RemoveNetwork forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) RemoveSecret ¶
func (b *DefaultStacksBackend) RemoveSecret(id string) error
RemoveSecret forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) RemoveService ¶
func (b *DefaultStacksBackend) RemoveService(id string) error
RemoveService forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) SubscribeToEvents ¶
func (b *DefaultStacksBackend) SubscribeToEvents(since, until time.Time, ef filters.Args) ([]events.Message, chan interface{})
SubscribeToEvents subscribes to events
func (*DefaultStacksBackend) UnsubscribeFromEvents ¶
func (b *DefaultStacksBackend) UnsubscribeFromEvents(events chan interface{})
UnsubscribeFromEvents unsubscribes to events
func (*DefaultStacksBackend) UpdateConfig ¶
func (b *DefaultStacksBackend) UpdateConfig(id string, version uint64, spec swarm.ConfigSpec) error
UpdateConfig forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) UpdateSecret ¶
func (b *DefaultStacksBackend) UpdateSecret(id string, version uint64, spec swarm.SecretSpec) error
UpdateSecret forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) UpdateService ¶
func (b *DefaultStacksBackend) UpdateService(id string, version uint64, spec swarm.ServiceSpec, opts dockerTypes.ServiceUpdateOptions, bo bool) (*dockerTypes.ServiceUpdateResponse, error)
UpdateService forwards to the calls to the SwarmResourceBackend
func (*DefaultStacksBackend) UpdateStack ¶
UpdateStack updates a stack.