Documentation
¶
Index ¶
- Variables
- type DistributionServer
- func (s *DistributionServer) GetRoute(ctx context.Context, req *pb.GetRouteRequest) (*pb.GetRouteResponse, error)
- func (s *DistributionServer) GetTimestamp(ctx context.Context, req *pb.GetTimestampRequest) (*pb.GetTimestampResponse, error)
- func (s *DistributionServer) ListRoutes(ctx context.Context, req *pb.ListRoutesRequest) (*pb.ListRoutesResponse, error)
- func (s *DistributionServer) SplitRange(ctx context.Context, req *pb.SplitRangeRequest) (*pb.SplitRangeResponse, error)
- func (s *DistributionServer) UpdateRoute(start, end []byte, group uint64)
- type DistributionServerOption
- type DynamoDBServer
- type GRPCServer
- func (r *GRPCServer) Close() error
- func (r *GRPCServer) Commit(ctx context.Context, req *pb.CommitRequest) (*pb.CommitResponse, error)
- func (r *GRPCServer) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.DeleteResponse, error)
- func (r *GRPCServer) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
- func (r *GRPCServer) PreWrite(ctx context.Context, req *pb.PreWriteRequest) (*pb.PreCommitResponse, error)
- func (r *GRPCServer) Put(ctx context.Context, req *pb.PutRequest) (*pb.PutResponse, error)
- func (r *GRPCServer) RawDelete(ctx context.Context, req *pb.RawDeleteRequest) (*pb.RawDeleteResponse, error)
- func (r *GRPCServer) RawGet(ctx context.Context, req *pb.RawGetRequest) (*pb.RawGetResponse, error)
- func (r *GRPCServer) RawLatestCommitTS(ctx context.Context, req *pb.RawLatestCommitTSRequest) (*pb.RawLatestCommitTSResponse, error)
- func (r *GRPCServer) RawPut(ctx context.Context, req *pb.RawPutRequest) (*pb.RawPutResponse, error)
- func (r *GRPCServer) RawScanAt(ctx context.Context, req *pb.RawScanAtRequest) (*pb.RawScanAtResponse, error)
- func (r *GRPCServer) Rollback(ctx context.Context, req *pb.RollbackRequest) (*pb.RollbackResponse, error)
- func (r *GRPCServer) Scan(ctx context.Context, req *pb.ScanRequest) (*pb.ScanResponse, error)
- type GRPCServerOption
- type Internal
- type Node
- type RedisServer
Constants ¶
This section is empty.
Variables ¶
var ErrLeaderNotFound = errors.New("leader not found")
var ErrNotLeader = errors.New("not leader")
var ErrTxnTimestampOverflow = errors.New("txn timestamp overflow")
Functions ¶
This section is empty.
Types ¶
type DistributionServer ¶
type DistributionServer struct {
pb.UnimplementedDistributionServer
// contains filtered or unexported fields
}
DistributionServer serves distribution related gRPC APIs.
func NewDistributionServer ¶
func NewDistributionServer(e *distribution.Engine, catalog *distribution.CatalogStore, opts ...DistributionServerOption) *DistributionServer
NewDistributionServer creates a new server.
func (*DistributionServer) GetRoute ¶
func (s *DistributionServer) GetRoute(ctx context.Context, req *pb.GetRouteRequest) (*pb.GetRouteResponse, error)
GetRoute returns route for a key.
func (*DistributionServer) GetTimestamp ¶
func (s *DistributionServer) GetTimestamp(ctx context.Context, req *pb.GetTimestampRequest) (*pb.GetTimestampResponse, error)
GetTimestamp returns monotonically increasing timestamp.
func (*DistributionServer) ListRoutes ¶
func (s *DistributionServer) ListRoutes(ctx context.Context, req *pb.ListRoutesRequest) (*pb.ListRoutesResponse, error)
ListRoutes returns all durable routes from catalog storage.
func (*DistributionServer) SplitRange ¶
func (s *DistributionServer) SplitRange(ctx context.Context, req *pb.SplitRangeRequest) (*pb.SplitRangeResponse, error)
SplitRange splits a route into two child routes in the same raft group.
func (*DistributionServer) UpdateRoute ¶
func (s *DistributionServer) UpdateRoute(start, end []byte, group uint64)
UpdateRoute allows updating route information.
type DistributionServerOption ¶
type DistributionServerOption func(*DistributionServer)
DistributionServerOption configures DistributionServer behavior.
func WithCatalogReloadRetryPolicy ¶
func WithCatalogReloadRetryPolicy(attempts int, interval time.Duration) DistributionServerOption
WithCatalogReloadRetryPolicy configures the retry policy used after split commit when waiting for the local catalog snapshot to become visible.
func WithDistributionCoordinator ¶
func WithDistributionCoordinator(coordinator kv.Coordinator) DistributionServerOption
WithDistributionCoordinator configures the coordinator used for Raft-backed catalog mutations in SplitRange.
type DynamoDBServer ¶
type DynamoDBServer struct {
// contains filtered or unexported fields
}
func NewDynamoDBServer ¶
func NewDynamoDBServer(listen net.Listener, st store.MVCCStore, coordinate kv.Coordinator) *DynamoDBServer
func (*DynamoDBServer) Run ¶
func (d *DynamoDBServer) Run() error
func (*DynamoDBServer) Stop ¶
func (d *DynamoDBServer) Stop()
type GRPCServer ¶
type GRPCServer struct {
pb.UnimplementedRawKVServer
pb.UnimplementedTransactionalKVServer
// contains filtered or unexported fields
}
func NewGRPCServer ¶
func NewGRPCServer(store store.MVCCStore, coordinate kv.Coordinator, opts ...GRPCServerOption) *GRPCServer
func (*GRPCServer) Close ¶
func (r *GRPCServer) Close() error
func (*GRPCServer) Commit ¶
func (r *GRPCServer) Commit(ctx context.Context, req *pb.CommitRequest) (*pb.CommitResponse, error)
func (*GRPCServer) Delete ¶
func (r *GRPCServer) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.DeleteResponse, error)
func (*GRPCServer) Get ¶
func (r *GRPCServer) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
func (*GRPCServer) PreWrite ¶
func (r *GRPCServer) PreWrite(ctx context.Context, req *pb.PreWriteRequest) (*pb.PreCommitResponse, error)
func (*GRPCServer) Put ¶
func (r *GRPCServer) Put(ctx context.Context, req *pb.PutRequest) (*pb.PutResponse, error)
func (*GRPCServer) RawDelete ¶
func (r *GRPCServer) RawDelete(ctx context.Context, req *pb.RawDeleteRequest) (*pb.RawDeleteResponse, error)
func (*GRPCServer) RawGet ¶
func (r *GRPCServer) RawGet(ctx context.Context, req *pb.RawGetRequest) (*pb.RawGetResponse, error)
func (*GRPCServer) RawLatestCommitTS ¶
func (r *GRPCServer) RawLatestCommitTS(ctx context.Context, req *pb.RawLatestCommitTSRequest) (*pb.RawLatestCommitTSResponse, error)
func (*GRPCServer) RawPut ¶
func (r *GRPCServer) RawPut(ctx context.Context, req *pb.RawPutRequest) (*pb.RawPutResponse, error)
func (*GRPCServer) RawScanAt ¶
func (r *GRPCServer) RawScanAt(ctx context.Context, req *pb.RawScanAtRequest) (*pb.RawScanAtResponse, error)
func (*GRPCServer) Rollback ¶
func (r *GRPCServer) Rollback(ctx context.Context, req *pb.RollbackRequest) (*pb.RollbackResponse, error)
func (*GRPCServer) Scan ¶
func (r *GRPCServer) Scan(ctx context.Context, req *pb.ScanRequest) (*pb.ScanResponse, error)
type GRPCServerOption ¶
type GRPCServerOption func(*GRPCServer)
func WithCloseStore ¶
func WithCloseStore() GRPCServerOption
type Internal ¶
type Internal struct {
pb.UnimplementedInternalServer
// contains filtered or unexported fields
}
func NewInternal ¶
func (*Internal) Forward ¶
func (i *Internal) Forward(_ context.Context, req *pb.ForwardRequest) (*pb.ForwardResponse, error)
type RedisServer ¶
type RedisServer struct {
// contains filtered or unexported fields
}
func NewRedisServer ¶
func NewRedisServer(listen net.Listener, store store.MVCCStore, coordinate kv.Coordinator, leaderRedis map[raft.ServerAddress]string) *RedisServer
func (*RedisServer) Run ¶
func (r *RedisServer) Run() error
func (*RedisServer) Stop ¶
func (r *RedisServer) Stop()