Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCServer ¶
func GRPCServer(s Server, options ...grpc.ServerOption) *grpc.Server
GRPCServer converts a metcd.Server to a *grpc.Server.
func PrefixRangeEnd ¶
PrefixRangeEnd allows Get, Delete, and Watch requests to operate on all keys with a matching prefix. Pass the prefix to this function, and use the result as the RangeEnd value.
Types ¶
type Server ¶
type Server interface { //etcdserverpb.AuthServer //etcdserverpb.ClusterServer etcdserverpb.KVServer }
Server collects the etcd V3 server interfaces that we implement.
func NewDefaultServer ¶
func NewDefaultServer( minPeerCount int, terminatec <-chan struct{}, terminatedc chan<- error, logger mesh.Logger, ) Server
NewDefaultServer is like NewServer, but we take care of creating a mesh.Router and meshconn.Peer for you, with sane defaults. If you need more fine-grained control, create the components yourself and use NewServer.
func NewServer ¶
func NewServer( router *mesh.Router, peer *meshconn.Peer, minPeerCount int, terminatec <-chan struct{}, terminatedc chan<- error, logger mesh.Logger, ) Server
NewServer returns a Server that (partially) implements the etcd V3 API. It uses the passed mesh components to act as the Raft transport. For the moment, it blocks until the mesh has minPeerCount peers. (This responsibility should rather be given to the caller.) The server can be terminated by certain conditions in the cluster. If that happens, terminatedc signaled, and the server is invalid.