Documentation
¶
Index ¶
- func CustomCodeToLevel(code codes.Code) zapcore.Level
- 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) DeleteObject(ctx context.Context, req *protobuf.DeleteObjectRequest) (*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) List(request *protobuf.ListRequest, stream protobuf.KVS_ListServer) 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) Set(ctx context.Context, req *protobuf.SetRequest) (*empty.Empty, error)
- func (s *GRPCService) SetObject(ctx context.Context, req *protobuf.SetObjectRequest) (*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) List(request *protobuf.ListRequest, stream protobuf.KVS_ListServer) error
- func (f *RaftFSM) Restore(rc io.ReadCloser) 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) DeleteObject(req *protobuf.DeleteObjectRequest) 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) List(request *protobuf.ListRequest, stream protobuf.KVS_ListServer) error
- func (s *RaftServer) Node() (*protobuf.Node, error)
- func (s *RaftServer) Nodes() (map[string]*protobuf.Node, error)
- func (s *RaftServer) Set(req *protobuf.SetRequest) error
- func (s *RaftServer) SetObject(req *protobuf.SetObjectRequest) 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 ¶
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 { protobuf.UnimplementedKVSServer // 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) DeleteObject ¶
func (s *GRPCService) DeleteObject(ctx context.Context, req *protobuf.DeleteObjectRequest) (*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) List ¶ added in v0.4.3
func (s *GRPCService) List(request *protobuf.ListRequest, stream protobuf.KVS_ListServer) 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) Set ¶
func (s *GRPCService) Set(ctx context.Context, req *protobuf.SetRequest) (*empty.Empty, error)
func (*GRPCService) SetObject ¶
func (s *GRPCService) SetObject(ctx context.Context, req *protobuf.SetObjectRequest) (*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 RaftFSM ¶
type RaftFSM struct {
// contains filtered or unexported fields
}
func (*RaftFSM) List ¶ added in v0.4.3
func (f *RaftFSM) List(request *protobuf.ListRequest, stream protobuf.KVS_ListServer) error
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) DeleteObject ¶
func (s *RaftServer) DeleteObject(req *protobuf.DeleteObjectRequest) 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) List ¶ added in v0.4.3
func (s *RaftServer) List(request *protobuf.ListRequest, stream protobuf.KVS_ListServer) error
func (*RaftServer) Set ¶
func (s *RaftServer) Set(req *protobuf.SetRequest) error
func (*RaftServer) SetObject ¶
func (s *RaftServer) SetObject(req *protobuf.SetObjectRequest) 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.