backend

package
v0.0.0-...-43d1ab5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

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

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

GetConfigs forwards to the calls to the SwarmResourceBackend

func (*DefaultStacksBackend) GetNetwork

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

GetSecrets forwards to the calls to the SwarmResourceBackend

func (*DefaultStacksBackend) GetService

func (b *DefaultStacksBackend) GetService(id string, insertDefaults bool) (swarm.Service, error)

GetService forwards to the calls to the SwarmResourceBackend

func (*DefaultStacksBackend) GetServices

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

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

UpdateService forwards to the calls to the SwarmResourceBackend

func (*DefaultStacksBackend) UpdateStack

func (b *DefaultStacksBackend) UpdateStack(id string, spec types.StackSpec, version uint64) error

UpdateStack updates a stack.

Jump to

Keyboard shortcuts

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