Versions in this module Expand all Collapse all v0 v0.3.2 May 20, 2020 Changes in this version + type GRPCGateway struct + func NewGRPCGateway(httpAddress string, grpcAddress string, certificateFile string, keyFile string, ...) (*GRPCGateway, error) + func (s *GRPCGateway) Start() error + func (s *GRPCGateway) Stop() error + type GRPCServer struct + func NewGRPCServer(grpcAddress string, raftServer *RaftServer, certificateFile string, ...) (*GRPCServer, error) + func (s *GRPCServer) Start() error + func (s *GRPCServer) Stop() error + type GRPCService struct + func NewGRPCService(raftServer *RaftServer, certificateFile string, commonName string, ...) (*GRPCService, error) + func (s *GRPCService) Cluster(ctx context.Context, req *empty.Empty) (*protobuf.ClusterResponse, error) + func (s *GRPCService) Delete(ctx context.Context, req *protobuf.DeleteRequest) (*empty.Empty, error) + func (s *GRPCService) Get(ctx context.Context, req *protobuf.GetRequest) (*protobuf.GetResponse, error) + func (s *GRPCService) Join(ctx context.Context, req *protobuf.JoinRequest) (*empty.Empty, error) + func (s *GRPCService) Leave(ctx context.Context, req *protobuf.LeaveRequest) (*empty.Empty, error) + func (s *GRPCService) LivenessCheck(ctx context.Context, req *empty.Empty) (*protobuf.LivenessCheckResponse, error) + func (s *GRPCService) Metrics(ctx context.Context, req *empty.Empty) (*protobuf.MetricsResponse, error) + func (s *GRPCService) Node(ctx context.Context, req *empty.Empty) (*protobuf.NodeResponse, error) + func (s *GRPCService) ReadinessCheck(ctx context.Context, req *empty.Empty) (*protobuf.ReadinessCheckResponse, error) + func (s *GRPCService) Scan(ctx context.Context, req *protobuf.ScanRequest) (*protobuf.ScanResponse, error) + func (s *GRPCService) Set(ctx context.Context, req *protobuf.SetRequest) (*empty.Empty, error) + func (s *GRPCService) Snapshot(ctx context.Context, req *empty.Empty) (*empty.Empty, error) + func (s *GRPCService) Start() error + func (s *GRPCService) Stop() error + func (s *GRPCService) Watch(req *empty.Empty, server protobuf.KVS_WatchServer) error + type KVSFSMSnapshot struct + func (f *KVSFSMSnapshot) Persist(sink raft.SnapshotSink) error + func (f *KVSFSMSnapshot) Release() + type RaftFSM struct + func NewRaftFSM(path string, logger *zap.Logger) (*RaftFSM, error) + func (f *RaftFSM) Apply(l *raft.Log) interface{} + func (f *RaftFSM) Close() error + func (f *RaftFSM) Get(key string) ([]byte, error) + func (f *RaftFSM) Restore(rc io.ReadCloser) error + func (f *RaftFSM) Scan(prefix string) ([][]byte, error) + func (f *RaftFSM) Snapshot() (raft.FSMSnapshot, error) + func (f *RaftFSM) Stats() map[string]string + type RaftServer struct + func NewRaftServer(id string, raftAddress string, dataDirectory string, bootstrap bool, ...) (*RaftServer, error) + func (s *RaftServer) Delete(req *protobuf.DeleteRequest) error + func (s *RaftServer) Exist(id string) (bool, error) + func (s *RaftServer) Get(req *protobuf.GetRequest) (*protobuf.GetResponse, error) + func (s *RaftServer) Join(id string, node *protobuf.Node) error + func (s *RaftServer) LeaderAddress(timeout time.Duration) (raft.ServerAddress, error) + func (s *RaftServer) LeaderID(timeout time.Duration) (raft.ServerID, error) + func (s *RaftServer) Leave(id string) error + func (s *RaftServer) Node() (*protobuf.Node, error) + func (s *RaftServer) Nodes() (map[string]*protobuf.Node, error) + func (s *RaftServer) Scan(req *protobuf.ScanRequest) (*protobuf.ScanResponse, error) + func (s *RaftServer) Set(req *protobuf.SetRequest) error + func (s *RaftServer) Snapshot() error + func (s *RaftServer) Start() error + func (s *RaftServer) State() raft.RaftState + func (s *RaftServer) StateStr() string + func (s *RaftServer) Stop() error + func (s *RaftServer) WaitForDetectLeader(timeout time.Duration) error