mirror of
https://github.com/moby/moby.git
synced 2026-07-10 00:28:51 +00:00
This fix updates SwarmKit to 78ae345f449ac69aa741c762df7e5f0020f70275 (from 037b4913929019d44bc927870bf2d92ce9ca261f) The following issues in docker are related - Can not update service in host publish mode (#30199) (fixed) - Add `ReadonlyRootfs` in ContainerSpec for `--read-only` (#29972) (needed) - Explicitly disallow network pluginv1 creation in swarm mode (See discussion in docker/swarmkit/pull/1899, docker/swarmkit/pull/1894, and docker/docker/pull/30332#issuecomment-274277948) This fix fixes #30199 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
34 lines
746 B
Go
34 lines
746 B
Go
package controlapi
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/docker/docker/pkg/plugingetter"
|
|
"github.com/docker/swarmkit/ca"
|
|
"github.com/docker/swarmkit/manager/state/raft"
|
|
"github.com/docker/swarmkit/manager/state/store"
|
|
)
|
|
|
|
var (
|
|
errNotImplemented = errors.New("not implemented")
|
|
errInvalidArgument = errors.New("invalid argument")
|
|
)
|
|
|
|
// Server is the Cluster API gRPC server.
|
|
type Server struct {
|
|
store *store.MemoryStore
|
|
raft *raft.Node
|
|
rootCA *ca.RootCA
|
|
pg plugingetter.PluginGetter
|
|
}
|
|
|
|
// NewServer creates a Cluster API server.
|
|
func NewServer(store *store.MemoryStore, raft *raft.Node, rootCA *ca.RootCA, pg plugingetter.PluginGetter) *Server {
|
|
return &Server{
|
|
store: store,
|
|
raft: raft,
|
|
rootCA: rootCA,
|
|
pg: pg,
|
|
}
|
|
}
|