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 DynamoDBServerOption
- 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 RedisPubSubRelay
- type RedisServer
- type RedisServerOption
- type S3Server
- type S3ServerOption
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 WithDistributionActiveTimestampTracker ¶
func WithDistributionActiveTimestampTracker(tracker *kv.ActiveTimestampTracker) DistributionServerOption
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, opts ...DynamoDBServerOption) *DynamoDBServer
func (*DynamoDBServer) Run ¶
func (d *DynamoDBServer) Run() error
func (*DynamoDBServer) Stop ¶
func (d *DynamoDBServer) Stop()
type DynamoDBServerOption ¶
type DynamoDBServerOption func(*DynamoDBServer)
func WithDynamoDBRequestObserver ¶
func WithDynamoDBRequestObserver(observer monitoring.DynamoDBRequestObserver) DynamoDBServerOption
WithDynamoDBRequestObserver enables Prometheus-compatible request metrics.
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 NewInternal(txm kv.Transactional, r *raft.Raft, clock *kv.HLC, relay *RedisPubSubRelay) *Internal
func (*Internal) Forward ¶
func (i *Internal) Forward(_ context.Context, req *pb.ForwardRequest) (*pb.ForwardResponse, error)
func (*Internal) RelayPublish ¶
func (i *Internal) RelayPublish(_ context.Context, req *pb.RelayPublishRequest) (*pb.RelayPublishResponse, error)
type RedisPubSubRelay ¶
type RedisPubSubRelay struct {
// contains filtered or unexported fields
}
RedisPubSubRelay lets the internal gRPC service publish into the local Redis pubsub bus without depending on RedisServer startup order.
func NewRedisPubSubRelay ¶
func NewRedisPubSubRelay() *RedisPubSubRelay
func (*RedisPubSubRelay) Bind ¶
func (r *RedisPubSubRelay) Bind(publish func(channel, message []byte) int64)
func (*RedisPubSubRelay) Publish ¶
func (r *RedisPubSubRelay) Publish(channel, message []byte) int64
type RedisServer ¶
type RedisServer struct {
// contains filtered or unexported fields
}
func NewRedisServer ¶
func NewRedisServer(listen net.Listener, redisAddr string, store store.MVCCStore, coordinate kv.Coordinator, leaderRedis map[raft.ServerAddress]string, relay *RedisPubSubRelay, opts ...RedisServerOption) *RedisServer
func (*RedisServer) Run ¶
func (r *RedisServer) Run() error
func (*RedisServer) Stop ¶
func (r *RedisServer) Stop()
type RedisServerOption ¶
type RedisServerOption func(*RedisServer)
func WithRedisActiveTimestampTracker ¶
func WithRedisActiveTimestampTracker(tracker *kv.ActiveTimestampTracker) RedisServerOption
type S3Server ¶
type S3Server struct {
// contains filtered or unexported fields
}
func NewS3Server ¶
func NewS3Server(listen net.Listener, s3Addr string, st store.MVCCStore, coordinate kv.Coordinator, leaderS3 map[raft.ServerAddress]string, opts ...S3ServerOption) *S3Server
type S3ServerOption ¶
type S3ServerOption func(*S3Server)
func WithS3ActiveTimestampTracker ¶
func WithS3ActiveTimestampTracker(tracker *kv.ActiveTimestampTracker) S3ServerOption
func WithS3Region ¶
func WithS3Region(region string) S3ServerOption
func WithS3StaticCredentials ¶
func WithS3StaticCredentials(creds map[string]string) S3ServerOption
Source Files
¶
- distribution_server.go
- dynamodb.go
- dynamodb_storage_codec.go
- dynamodb_types.go
- grpc.go
- grpc_transcoder.go
- internal.go
- prefix_scan.go
- pubsub_relay.go
- redis.go
- redis_compat_commands.go
- redis_compat_helpers.go
- redis_compat_types.go
- redis_lua.go
- redis_lua_context.go
- redis_proxy.go
- redis_pubsub.go
- redis_retry.go
- redis_storage_codec.go
- redis_transcord.go
- s3.go
- s3_auth.go
- test_util.go
- ts.go