adapter

package
v0.0.0-...-a779712 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: AGPL-3.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLeaderNotFound = errors.New("leader not found")
View Source
var ErrNotLeader = errors.New("not leader")
View Source
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

GetRoute returns route for a key.

func (*DistributionServer) GetTimestamp

GetTimestamp returns monotonically increasing timestamp.

func (*DistributionServer) ListRoutes

ListRoutes returns all durable routes from catalog storage.

func (*DistributionServer) SplitRange

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 (*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 (*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

type Node

type Node struct {
	// contains filtered or unexported fields
}

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

func (*S3Server) Run

func (s *S3Server) Run() error

func (*S3Server) Stop

func (s *S3Server) Stop()

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL