Documentation ¶
Index ¶
- type ApplyResponse
- type GRPCGateway
- type GRPCServer
- type GRPCService
- func (s *GRPCService) BulkDelete(ctx context.Context, req *protobuf.BulkDeleteRequest) (*protobuf.BulkDeleteResponse, error)
- func (s *GRPCService) BulkIndex(ctx context.Context, req *protobuf.BulkIndexRequest) (*protobuf.BulkIndexResponse, 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) Mapping(ctx context.Context, req *empty.Empty) (*protobuf.MappingResponse, 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) Search(ctx context.Context, req *protobuf.SearchRequest) (*protobuf.SearchResponse, 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.Index_WatchServer) error
- type KVSFSMSnapshot
- type RaftFSM
- type RaftServer
- func (s *RaftServer) BulkDelete(req *protobuf.BulkDeleteRequest) error
- func (s *RaftServer) BulkIndex(req *protobuf.BulkIndexRequest) error
- func (s *RaftServer) Delete(req *protobuf.DeleteRequest) error
- func (s *RaftServer) Exist(id string) (bool, error)
- func (s *RaftServer) Get(id string) (map[string]interface{}, 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) Mapping() (*protobuf.MappingResponse, error)
- func (s *RaftServer) Node() (*protobuf.Node, error)
- func (s *RaftServer) Nodes() (map[string]*protobuf.Node, error)
- func (s *RaftServer) Search(searchRequest *bleve.SearchRequest) (*bleve.SearchResult, 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 ApplyResponse ¶
type ApplyResponse struct {
// contains filtered or unexported fields
}
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, logger *zap.Logger) (*GRPCServer, error)
func NewGRPCServerWithTLS ¶ added in v0.9.1
func NewGRPCServerWithTLS(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) BulkDelete ¶
func (s *GRPCService) BulkDelete(ctx context.Context, req *protobuf.BulkDeleteRequest) (*protobuf.BulkDeleteResponse, error)
func (*GRPCService) BulkIndex ¶
func (s *GRPCService) BulkIndex(ctx context.Context, req *protobuf.BulkIndexRequest) (*protobuf.BulkIndexResponse, 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) Mapping ¶
func (s *GRPCService) Mapping(ctx context.Context, req *empty.Empty) (*protobuf.MappingResponse, 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) Search ¶
func (s *GRPCService) Search(ctx context.Context, req *protobuf.SearchRequest) (*protobuf.SearchResponse, 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.Index_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 NewRaftFSM ¶
func (*RaftFSM) Mapping ¶
func (f *RaftFSM) Mapping() *mapping.IndexMappingImpl
type RaftServer ¶
type RaftServer struct {
// contains filtered or unexported fields
}
func NewRaftServer ¶
func NewRaftServer(id string, raftAddress string, dataDirectory string, indexMapping *mapping.IndexMappingImpl, bootstrap bool, logger *zap.Logger) (*RaftServer, error)
func (*RaftServer) BulkDelete ¶
func (s *RaftServer) BulkDelete(req *protobuf.BulkDeleteRequest) error
func (*RaftServer) BulkIndex ¶
func (s *RaftServer) BulkIndex(req *protobuf.BulkIndexRequest) error
func (*RaftServer) Delete ¶
func (s *RaftServer) Delete(req *protobuf.DeleteRequest) 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) Mapping ¶
func (s *RaftServer) Mapping() (*protobuf.MappingResponse, error)
func (*RaftServer) Search ¶
func (s *RaftServer) Search(searchRequest *bleve.SearchRequest) (*bleve.SearchResult, 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.