Documentation
¶
Index ¶
- type GRPCGateway
- type GRPCServer
- type GRPCService
- 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
- type RaftFSM
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCGateway ¶
type GRPCGateway struct {
// contains filtered or unexported fields
}
func NewGRPCGateway ¶
func (*GRPCGateway) Start ¶
func (s *GRPCGateway) Start() error
func (*GRPCGateway) Stop ¶
func (s *GRPCGateway) Stop() error
type GRPCServer ¶
type GRPCServer struct {
// contains filtered or unexported fields
}
func NewGRPCServer ¶
func NewGRPCServer(grpcAddress string, raftServer *RaftServer, certificateFile string, keyFile string, commonName string, logger *zap.Logger) (*GRPCServer, error)
func (*GRPCServer) Start ¶
func (s *GRPCServer) Start() error
func (*GRPCServer) Stop ¶
func (s *GRPCServer) Stop() error
type GRPCService ¶
type GRPCService struct {
// contains filtered or unexported fields
}
func NewGRPCService ¶
func NewGRPCService(raftServer *RaftServer, certificateFile string, commonName string, logger *zap.Logger) (*GRPCService, error)
func (*GRPCService) Cluster ¶
func (s *GRPCService) Cluster(ctx context.Context, req *empty.Empty) (*protobuf.ClusterResponse, error)
func (*GRPCService) Delete ¶
func (s *GRPCService) Delete(ctx context.Context, req *protobuf.DeleteRequest) (*empty.Empty, error)
func (*GRPCService) Get ¶
func (s *GRPCService) Get(ctx context.Context, req *protobuf.GetRequest) (*protobuf.GetResponse, error)
func (*GRPCService) Join ¶
func (s *GRPCService) Join(ctx context.Context, req *protobuf.JoinRequest) (*empty.Empty, error)
func (*GRPCService) Leave ¶
func (s *GRPCService) Leave(ctx context.Context, req *protobuf.LeaveRequest) (*empty.Empty, error)
func (*GRPCService) LivenessCheck ¶
func (s *GRPCService) LivenessCheck(ctx context.Context, req *empty.Empty) (*protobuf.LivenessCheckResponse, error)
func (*GRPCService) Metrics ¶
func (s *GRPCService) Metrics(ctx context.Context, req *empty.Empty) (*protobuf.MetricsResponse, error)
func (*GRPCService) Node ¶
func (s *GRPCService) Node(ctx context.Context, req *empty.Empty) (*protobuf.NodeResponse, error)
func (*GRPCService) ReadinessCheck ¶
func (s *GRPCService) ReadinessCheck(ctx context.Context, req *empty.Empty) (*protobuf.ReadinessCheckResponse, error)
func (*GRPCService) Scan ¶
func (s *GRPCService) Scan(ctx context.Context, req *protobuf.ScanRequest) (*protobuf.ScanResponse, error)
func (*GRPCService) Set ¶
func (s *GRPCService) Set(ctx context.Context, req *protobuf.SetRequest) (*empty.Empty, error)
func (*GRPCService) Start ¶
func (s *GRPCService) Start() error
func (*GRPCService) Stop ¶
func (s *GRPCService) Stop() error
func (*GRPCService) Watch ¶
func (s *GRPCService) Watch(req *empty.Empty, server protobuf.KVS_WatchServer) error
type KVSFSMSnapshot ¶
type KVSFSMSnapshot struct {
// contains filtered or unexported fields
}
func (*KVSFSMSnapshot) Persist ¶
func (f *KVSFSMSnapshot) Persist(sink raft.SnapshotSink) error
func (*KVSFSMSnapshot) Release ¶
func (f *KVSFSMSnapshot) Release()
type RaftServer ¶
type RaftServer struct {
// contains filtered or unexported fields
}
func NewRaftServer ¶
func (*RaftServer) Delete ¶
func (s *RaftServer) Delete(req *protobuf.DeleteRequest) error
func (*RaftServer) Get ¶
func (s *RaftServer) Get(req *protobuf.GetRequest) (*protobuf.GetResponse, error)
func (*RaftServer) LeaderAddress ¶
func (s *RaftServer) LeaderAddress(timeout time.Duration) (raft.ServerAddress, error)
func (*RaftServer) Leave ¶
func (s *RaftServer) Leave(id string) error
func (*RaftServer) Scan ¶
func (s *RaftServer) Scan(req *protobuf.ScanRequest) (*protobuf.ScanResponse, error)
func (*RaftServer) Set ¶
func (s *RaftServer) Set(req *protobuf.SetRequest) error
func (*RaftServer) Snapshot ¶
func (s *RaftServer) Snapshot() error
func (*RaftServer) Start ¶
func (s *RaftServer) Start() error
func (*RaftServer) State ¶
func (s *RaftServer) State() raft.RaftState
func (*RaftServer) StateStr ¶
func (s *RaftServer) StateStr() string
func (*RaftServer) Stop ¶
func (s *RaftServer) Stop() error
func (*RaftServer) WaitForDetectLeader ¶
func (s *RaftServer) WaitForDetectLeader(timeout time.Duration) error
Click to show internal directories.
Click to hide internal directories.