provider

package
v0.0.0-...-08d0b3e Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: PostgreSQL Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialRouter

func DialRouter(r *topology.Router) (*grpc.ClientConn, error)

func NewCoordShardInfo

func NewCoordShardInfo(conn *routerproto.BackendConnectionsInfo, router string) shard.Shardinfo

func NewCoordinator

func NewCoordinator(tlsconfig *tls.Config, db qdb.XQDB) *qdbCoordinator

Types

type CoordPool

type CoordPool struct {
	pool.ConnectionKepperData
}

func NewCoordPool

func NewCoordPool(info *protos.PoolInfo) *CoordPool

func (*CoordPool) Connection

func (r *CoordPool) Connection(clid uint, shardKey kr.ShardKey) (shard.Shard, error)

TODO : unit tests TODO : implement

func (*CoordPool) ForEach

func (r *CoordPool) ForEach(cb func(p shard.Shardinfo) error) error

TODO : unit tests TODO : implement

type CoordShardInfo

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

func (*CoordShardInfo) DB

func (c *CoordShardInfo) DB() string

func (*CoordShardInfo) ID

func (c *CoordShardInfo) ID() uint

func (*CoordShardInfo) InstanceHostname

func (c *CoordShardInfo) InstanceHostname() string

func (*CoordShardInfo) ListPreparedStatements

func (c *CoordShardInfo) ListPreparedStatements() []shard.PreparedStatementsMgrDescriptor

ListPreparedStatements implements shard.Shardinfo.

func (*CoordShardInfo) Pid

func (c *CoordShardInfo) Pid() uint32

Pid implements shard.Shardinfo.

func (*CoordShardInfo) Router

func (c *CoordShardInfo) Router() string

func (*CoordShardInfo) ShardKeyName

func (c *CoordShardInfo) ShardKeyName() string

func (*CoordShardInfo) Sync

func (c *CoordShardInfo) Sync() int64

func (*CoordShardInfo) TxServed

func (c *CoordShardInfo) TxServed() int64

func (*CoordShardInfo) TxStatus

func (c *CoordShardInfo) TxStatus() txstatus.TXStatus

func (*CoordShardInfo) Usr

func (c *CoordShardInfo) Usr() string

type CoordinatorClient

type CoordinatorClient interface {
	client.Client

	CancelMsg() *pgproto3.CancelRequest
}

type CoordinatorService

type CoordinatorService struct {
	protos.UnimplementedKeyRangeServiceServer
	// contains filtered or unexported fields
}

func (*CoordinatorService) CreateKeyRange

TODO : unit tests

func (*CoordinatorService) DropAllKeyRanges

DropAllKeyRanges implements proto.KeyRangeServiceServer.

func (*CoordinatorService) DropKeyRange

DropKeyRange implements proto.KeyRangeServiceServer.

func (*CoordinatorService) GetKeyRange

GetKeyRange gets key ranges with given ids TODO unit tests

func (*CoordinatorService) ListAllKeyRanges

func (*CoordinatorService) ListKeyRange

TODO : unit tests

func (*CoordinatorService) LockKeyRange

TODO : unit tests

func (*CoordinatorService) MergeKeyRange

TODO : unit tests

func (*CoordinatorService) MoveKeyRange

TODO : unit tests

func (*CoordinatorService) SplitKeyRange

TODO : unit tests

func (*CoordinatorService) UnlockKeyRange

TODO : unit tests

type DistributionsServer

type DistributionsServer struct {
	protos.UnimplementedDistributionServiceServer
	// contains filtered or unexported fields
}

func NewDistributionServer

func NewDistributionServer(impl coordinator.Coordinator) *DistributionsServer

func (*DistributionsServer) CreateDistribution

func (*DistributionsServer) DropDistribution

func (*DistributionsServer) GetDistribution

func (*DistributionsServer) ListDistributions

type RouterService

type RouterService struct {
	protos.UnimplementedRouterServiceServer
	// contains filtered or unexported fields
}

func NewRouterService

func NewRouterService(impl coordinator.Coordinator) *RouterService

func (RouterService) AddRouter

TODO : unit tests

func (RouterService) ListRouters

TODO : unit tests

func (RouterService) RemoveRouter

TODO : unit tests

func (RouterService) SyncMetadata

TODO : unit tests

type ShardServer

type ShardServer struct {
	protos.UnimplementedShardServiceServer
	// contains filtered or unexported fields
}

func NewShardServer

func NewShardServer(impl coordinator.Coordinator) *ShardServer

func (*ShardServer) AddDataShard

func (s *ShardServer) AddDataShard(ctx context.Context, request *protos.AddShardRequest) (*protos.AddShardReply, error)

TODO : unit tests

func (*ShardServer) AddWorldShard

func (s *ShardServer) AddWorldShard(ctx context.Context, request *protos.AddWorldShardRequest) (*protos.AddShardReply, error)

func (*ShardServer) GetShard

func (s *ShardServer) GetShard(ctx context.Context, shardRequest *protos.ShardRequest) (*protos.ShardReply, error)

TODO : unit tests

func (*ShardServer) ListShards

TODO : unit tests TODO: remove ShardRequest.

type TasksServer

type TasksServer struct {
	protos.UnimplementedTasksServiceServer
	// contains filtered or unexported fields
}

func NewTasksServer

func NewTasksServer(impl coordinator.Coordinator) *TasksServer

func (TasksServer) GetTaskGroup

func (TasksServer) RemoveTaskGroup

func (TasksServer) WriteTaskGroup

type TopologyService

type TopologyService struct {
	protos.UnimplementedTopologyServiceServer
	// contains filtered or unexported fields
}

func NewTopologyService

func NewTopologyService(impl coordinator.Coordinator) *TopologyService

func (*TopologyService) CloseRouter

TODO : implement

func (*TopologyService) OpenRouter

TODO : implement

func (*TopologyService) UpdateCoordinator

TODO : implement

Jump to

Keyboard shortcuts

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