adapter

package
v0.0.0-...-20b106b Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: AGPL-3.0 Imports: 41 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 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 (*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) *Internal

func (*Internal) Forward

func (i *Internal) Forward(_ context.Context, req *pb.ForwardRequest) (*pb.ForwardResponse, error)

type Node

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

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

Jump to

Keyboard shortcuts

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