github.com/hms58/moby@v1.13.1/api/server/router/swarm/backend.go (about) 1 package swarm 2 3 import ( 4 basictypes "github.com/docker/docker/api/types" 5 "github.com/docker/docker/api/types/backend" 6 types "github.com/docker/docker/api/types/swarm" 7 "golang.org/x/net/context" 8 ) 9 10 // Backend abstracts an swarm commands manager. 11 type Backend interface { 12 Init(req types.InitRequest) (string, error) 13 Join(req types.JoinRequest) error 14 Leave(force bool) error 15 Inspect() (types.Swarm, error) 16 Update(uint64, types.Spec, types.UpdateFlags) error 17 GetUnlockKey() (string, error) 18 UnlockSwarm(req types.UnlockRequest) error 19 GetServices(basictypes.ServiceListOptions) ([]types.Service, error) 20 GetService(string) (types.Service, error) 21 CreateService(types.ServiceSpec, string) (*basictypes.ServiceCreateResponse, error) 22 UpdateService(string, uint64, types.ServiceSpec, string, string) (*basictypes.ServiceUpdateResponse, error) 23 RemoveService(string) error 24 ServiceLogs(context.Context, string, *backend.ContainerLogsConfig, chan struct{}) error 25 GetNodes(basictypes.NodeListOptions) ([]types.Node, error) 26 GetNode(string) (types.Node, error) 27 UpdateNode(string, uint64, types.NodeSpec) error 28 RemoveNode(string, bool) error 29 GetTasks(basictypes.TaskListOptions) ([]types.Task, error) 30 GetTask(string) (types.Task, error) 31 GetSecrets(opts basictypes.SecretListOptions) ([]types.Secret, error) 32 CreateSecret(s types.SecretSpec) (string, error) 33 RemoveSecret(id string) error 34 GetSecret(id string) (types.Secret, error) 35 UpdateSecret(id string, version uint64, spec types.SecretSpec) error 36 }