mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f2614f2107
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
30 lines
623 B
Go
30 lines
623 B
Go
package controlapi
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"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
|
|
}
|
|
|
|
// NewServer creates a Cluster API server.
|
|
func NewServer(store *store.MemoryStore, raft *raft.Node, rootCA *ca.RootCA) *Server {
|
|
return &Server{
|
|
store: store,
|
|
raft: raft,
|
|
rootCA: rootCA,
|
|
}
|
|
}
|