mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
![Tonis Tiigi](/assets/img/avatar_default.png)
As described in our ROADMAP.md, introduce new Swarm management API endpoints relying on swarmkit to deploy services. It currently vendors docker/engine-api changes. This PR is fully backward compatible (joining a Swarm is an optional feature of the Engine, and existing commands are not impacted). Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> Signed-off-by: Victor Vieux <vieux@docker.com> Signed-off-by: Daniel Nephin <dnephin@docker.com> Signed-off-by: Jana Radhakrishnan <mrjana@docker.com> Signed-off-by: Madhu Venugopal <madhu@docker.com>
26 lines
889 B
Go
26 lines
889 B
Go
package swarm
|
|
|
|
import (
|
|
basictypes "github.com/docker/engine-api/types"
|
|
types "github.com/docker/engine-api/types/swarm"
|
|
)
|
|
|
|
// Backend abstracts an swarm commands manager.
|
|
type Backend interface {
|
|
Init(req types.InitRequest) (string, error)
|
|
Join(req types.JoinRequest) error
|
|
Leave(force bool) error
|
|
Inspect() (types.Swarm, error)
|
|
Update(uint64, types.Spec) error
|
|
GetServices(basictypes.ServiceListOptions) ([]types.Service, error)
|
|
GetService(string) (types.Service, error)
|
|
CreateService(types.ServiceSpec) (string, error)
|
|
UpdateService(string, uint64, types.ServiceSpec) error
|
|
RemoveService(string) error
|
|
GetNodes(basictypes.NodeListOptions) ([]types.Node, error)
|
|
GetNode(string) (types.Node, error)
|
|
UpdateNode(string, uint64, types.NodeSpec) error
|
|
RemoveNode(string) error
|
|
GetTasks(basictypes.TaskListOptions) ([]types.Task, error)
|
|
GetTask(string) (types.Task, error)
|
|
}
|