Documentation ¶
Index ¶
- func DialRouter(r *topology.Router) (*grpc.ClientConn, error)
- func NewCoordShardInfo(conn *protos.BackendConnectionsInfo, router string) shard.Shardinfo
- func NewCoordinator(tlsconfig *tls.Config, db qdb.XQDB) (*qdbCoordinator, error)
- func NewKeyRangeService(impl coordinator.Coordinator) protos.KeyRangeServiceServer
- type CoordShardInfo
- func (c *CoordShardInfo) DB() string
- func (c *CoordShardInfo) DataPending() bool
- func (c *CoordShardInfo) ID() uint
- func (c *CoordShardInfo) InstanceHostname() string
- func (c *CoordShardInfo) ListPreparedStatements() []shard.PreparedStatementsMgrDescriptor
- func (c *CoordShardInfo) Pid() uint32
- func (c *CoordShardInfo) RequestData()
- func (c *CoordShardInfo) Router() string
- func (c *CoordShardInfo) ShardKeyName() string
- func (c *CoordShardInfo) Sync() int64
- func (c *CoordShardInfo) TxServed() int64
- func (c *CoordShardInfo) TxStatus() txstatus.TXStatus
- func (c *CoordShardInfo) Usr() string
- type CoordinatorClient
- type CoordinatorService
- func (c *CoordinatorService) BatchMoveKeyRange(ctx context.Context, request *protos.BatchMoveKeyRangeRequest) (*emptypb.Empty, error)
- func (c *CoordinatorService) CreateKeyRange(ctx context.Context, request *protos.CreateKeyRangeRequest) (*protos.ModifyReply, error)
- func (c *CoordinatorService) DropAllKeyRanges(ctx context.Context, request *emptypb.Empty) (*protos.DropAllKeyRangesResponse, error)
- func (c *CoordinatorService) DropKeyRange(ctx context.Context, request *protos.DropKeyRangeRequest) (*protos.ModifyReply, error)
- func (c *CoordinatorService) GetKeyRange(ctx context.Context, request *protos.GetKeyRangeRequest) (*protos.KeyRangeReply, error)
- func (c *CoordinatorService) ListAllKeyRanges(ctx context.Context, _ *emptypb.Empty) (*protos.KeyRangeReply, error)
- func (c *CoordinatorService) ListKeyRange(ctx context.Context, request *protos.ListKeyRangeRequest) (*protos.KeyRangeReply, error)
- func (c *CoordinatorService) LockKeyRange(ctx context.Context, request *protos.LockKeyRangeRequest) (*protos.ModifyReply, error)
- func (c *CoordinatorService) MergeKeyRange(ctx context.Context, request *protos.MergeKeyRangeRequest) (*protos.ModifyReply, error)
- func (c *CoordinatorService) MoveKeyRange(ctx context.Context, request *protos.MoveKeyRangeRequest) (*protos.ModifyReply, error)
- func (c *CoordinatorService) RedistributeKeyRange(ctx context.Context, request *protos.RedistributeKeyRangeRequest) (*emptypb.Empty, error)
- func (c *CoordinatorService) RenameKeyRange(ctx context.Context, request *protos.RenameKeyRangeRequest) (*emptypb.Empty, error)
- func (c *CoordinatorService) SplitKeyRange(ctx context.Context, request *protos.SplitKeyRangeRequest) (*protos.ModifyReply, error)
- func (c *CoordinatorService) UnlockKeyRange(ctx context.Context, request *protos.UnlockKeyRangeRequest) (*protos.ModifyReply, error)
- type DistributionsServer
- func (d *DistributionsServer) AlterDistributionAttach(ctx context.Context, req *protos.AlterDistributionAttachRequest) (*emptypb.Empty, error)
- func (d *DistributionsServer) AlterDistributionDetach(ctx context.Context, req *protos.AlterDistributionDetachRequest) (*emptypb.Empty, error)
- func (d *DistributionsServer) CreateDistribution(ctx context.Context, req *protos.CreateDistributionRequest) (*emptypb.Empty, error)
- func (d *DistributionsServer) DropDistribution(ctx context.Context, req *protos.DropDistributionRequest) (*emptypb.Empty, error)
- func (d *DistributionsServer) GetDistribution(ctx context.Context, req *protos.GetDistributionRequest) (*protos.GetDistributionReply, error)
- func (d *DistributionsServer) GetRelationDistribution(ctx context.Context, req *protos.GetRelationDistributionRequest) (*protos.GetRelationDistributionReply, error)
- func (d *DistributionsServer) ListDistributions(ctx context.Context, _ *emptypb.Empty) (*protos.ListDistributionsReply, error)
- type RouterService
- func (r RouterService) AddRouter(ctx context.Context, request *protos.AddRouterRequest) (*protos.AddRouterReply, error)
- func (r RouterService) ListRouters(ctx context.Context, _ *emptypb.Empty) (*protos.ListRoutersReply, error)
- func (r RouterService) RemoveRouter(ctx context.Context, request *protos.RemoveRouterRequest) (*emptypb.Empty, error)
- func (r RouterService) SyncMetadata(ctx context.Context, request *protos.SyncMetadataRequest) (*emptypb.Empty, error)
- type ShardServer
- func (s *ShardServer) AddDataShard(ctx context.Context, request *protos.AddShardRequest) (*emptypb.Empty, error)
- func (s *ShardServer) AddWorldShard(ctx context.Context, request *protos.AddWorldShardRequest) (*emptypb.Empty, error)
- func (s *ShardServer) GetShard(ctx context.Context, shardRequest *protos.ShardRequest) (*protos.ShardReply, error)
- func (s *ShardServer) ListShards(ctx context.Context, _ *emptypb.Empty) (*protos.ListShardsReply, error)
- type TasksServer
- func (t TasksServer) GetBalancerTask(ctx context.Context, _ *emptypb.Empty) (*protos.GetBalancerTaskReply, error)
- func (t TasksServer) GetMoveTaskGroup(ctx context.Context, _ *emptypb.Empty) (*protos.GetMoveTaskGroupReply, error)
- func (t TasksServer) RemoveBalancerTask(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)
- func (t TasksServer) RemoveMoveTaskGroup(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)
- func (t TasksServer) WriteBalancerTask(ctx context.Context, request *protos.WriteBalancerTaskRequest) (*emptypb.Empty, error)
- func (t TasksServer) WriteMoveTaskGroup(ctx context.Context, request *protos.WriteMoveTaskGroupRequest) (*emptypb.Empty, error)
- type TopologyService
- func (r *TopologyService) CloseRouter(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)
- func (r *TopologyService) OpenRouter(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)
- func (r *TopologyService) UpdateCoordinator(ctx context.Context, in *protos.UpdateCoordinatorRequest) (*emptypb.Empty, error)
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 *protos.BackendConnectionsInfo, router string) shard.Shardinfo
func NewCoordinator ¶
func NewKeyRangeService ¶
func NewKeyRangeService(impl coordinator.Coordinator) protos.KeyRangeServiceServer
Types ¶
type CoordShardInfo ¶
type CoordShardInfo struct {
// contains filtered or unexported fields
}
func (*CoordShardInfo) DB ¶
func (c *CoordShardInfo) DB() string
func (*CoordShardInfo) DataPending ¶
func (c *CoordShardInfo) DataPending() bool
DataPending implements shard.Shardinfo.
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) RequestData ¶
func (c *CoordShardInfo) RequestData()
RequestData 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) BatchMoveKeyRange ¶
func (c *CoordinatorService) BatchMoveKeyRange(ctx context.Context, request *protos.BatchMoveKeyRangeRequest) (*emptypb.Empty, error)
TODO: unit tests
func (*CoordinatorService) CreateKeyRange ¶
func (c *CoordinatorService) CreateKeyRange(ctx context.Context, request *protos.CreateKeyRangeRequest) (*protos.ModifyReply, error)
TODO : unit tests
func (*CoordinatorService) DropAllKeyRanges ¶
func (c *CoordinatorService) DropAllKeyRanges(ctx context.Context, request *emptypb.Empty) (*protos.DropAllKeyRangesResponse, error)
DropAllKeyRanges implements proto.KeyRangeServiceServer.
func (*CoordinatorService) DropKeyRange ¶
func (c *CoordinatorService) DropKeyRange(ctx context.Context, request *protos.DropKeyRangeRequest) (*protos.ModifyReply, error)
DropKeyRange implements proto.KeyRangeServiceServer.
func (*CoordinatorService) GetKeyRange ¶
func (c *CoordinatorService) GetKeyRange(ctx context.Context, request *protos.GetKeyRangeRequest) (*protos.KeyRangeReply, error)
GetKeyRange gets key ranges with given ids TODO unit tests
func (*CoordinatorService) ListAllKeyRanges ¶
func (c *CoordinatorService) ListAllKeyRanges(ctx context.Context, _ *emptypb.Empty) (*protos.KeyRangeReply, error)
func (*CoordinatorService) ListKeyRange ¶
func (c *CoordinatorService) ListKeyRange(ctx context.Context, request *protos.ListKeyRangeRequest) (*protos.KeyRangeReply, error)
TODO : unit tests
func (*CoordinatorService) LockKeyRange ¶
func (c *CoordinatorService) LockKeyRange(ctx context.Context, request *protos.LockKeyRangeRequest) (*protos.ModifyReply, error)
TODO : unit tests
func (*CoordinatorService) MergeKeyRange ¶
func (c *CoordinatorService) MergeKeyRange(ctx context.Context, request *protos.MergeKeyRangeRequest) (*protos.ModifyReply, error)
TODO : unit tests
func (*CoordinatorService) MoveKeyRange ¶
func (c *CoordinatorService) MoveKeyRange(ctx context.Context, request *protos.MoveKeyRangeRequest) (*protos.ModifyReply, error)
TODO : unit tests
func (*CoordinatorService) RedistributeKeyRange ¶
func (c *CoordinatorService) RedistributeKeyRange(ctx context.Context, request *protos.RedistributeKeyRangeRequest) (*emptypb.Empty, error)
TODO: unit tests
func (*CoordinatorService) RenameKeyRange ¶
func (c *CoordinatorService) RenameKeyRange(ctx context.Context, request *protos.RenameKeyRangeRequest) (*emptypb.Empty, error)
TODO: unit tests
func (*CoordinatorService) SplitKeyRange ¶
func (c *CoordinatorService) SplitKeyRange(ctx context.Context, request *protos.SplitKeyRangeRequest) (*protos.ModifyReply, error)
TODO : unit tests
func (*CoordinatorService) UnlockKeyRange ¶
func (c *CoordinatorService) UnlockKeyRange(ctx context.Context, request *protos.UnlockKeyRangeRequest) (*protos.ModifyReply, error)
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) AlterDistributionAttach ¶
func (d *DistributionsServer) AlterDistributionAttach(ctx context.Context, req *protos.AlterDistributionAttachRequest) (*emptypb.Empty, error)
func (*DistributionsServer) AlterDistributionDetach ¶
func (d *DistributionsServer) AlterDistributionDetach(ctx context.Context, req *protos.AlterDistributionDetachRequest) (*emptypb.Empty, error)
func (*DistributionsServer) CreateDistribution ¶
func (d *DistributionsServer) CreateDistribution(ctx context.Context, req *protos.CreateDistributionRequest) (*emptypb.Empty, error)
func (*DistributionsServer) DropDistribution ¶
func (d *DistributionsServer) DropDistribution(ctx context.Context, req *protos.DropDistributionRequest) (*emptypb.Empty, error)
func (*DistributionsServer) GetDistribution ¶
func (d *DistributionsServer) GetDistribution(ctx context.Context, req *protos.GetDistributionRequest) (*protos.GetDistributionReply, error)
func (*DistributionsServer) GetRelationDistribution ¶
func (d *DistributionsServer) GetRelationDistribution(ctx context.Context, req *protos.GetRelationDistributionRequest) (*protos.GetRelationDistributionReply, error)
func (*DistributionsServer) ListDistributions ¶
func (d *DistributionsServer) ListDistributions(ctx context.Context, _ *emptypb.Empty) (*protos.ListDistributionsReply, error)
type RouterService ¶
type RouterService struct { protos.UnimplementedRouterServiceServer // contains filtered or unexported fields }
func NewRouterService ¶
func NewRouterService(impl coordinator.Coordinator) *RouterService
func (RouterService) AddRouter ¶
func (r RouterService) AddRouter(ctx context.Context, request *protos.AddRouterRequest) (*protos.AddRouterReply, error)
TODO : unit tests
func (RouterService) ListRouters ¶
func (r RouterService) ListRouters(ctx context.Context, _ *emptypb.Empty) (*protos.ListRoutersReply, error)
TODO : unit tests
func (RouterService) RemoveRouter ¶
func (r RouterService) RemoveRouter(ctx context.Context, request *protos.RemoveRouterRequest) (*emptypb.Empty, error)
TODO : unit tests
func (RouterService) SyncMetadata ¶
func (r RouterService) SyncMetadata(ctx context.Context, request *protos.SyncMetadataRequest) (*emptypb.Empty, error)
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) (*emptypb.Empty, error)
TODO : unit tests
func (*ShardServer) AddWorldShard ¶
func (s *ShardServer) AddWorldShard(ctx context.Context, request *protos.AddWorldShardRequest) (*emptypb.Empty, error)
func (*ShardServer) GetShard ¶
func (s *ShardServer) GetShard(ctx context.Context, shardRequest *protos.ShardRequest) (*protos.ShardReply, error)
TODO : unit tests
func (*ShardServer) ListShards ¶
func (s *ShardServer) ListShards(ctx context.Context, _ *emptypb.Empty) (*protos.ListShardsReply, error)
TODO : unit tests TODO: remove ShardRequest.
type TasksServer ¶
type TasksServer struct { protos.UnimplementedMoveTasksServiceServer protos.UnimplementedBalancerTaskServiceServer // contains filtered or unexported fields }
func NewTasksServer ¶
func NewTasksServer(impl coordinator.Coordinator) *TasksServer
func (TasksServer) GetBalancerTask ¶
func (t TasksServer) GetBalancerTask(ctx context.Context, _ *emptypb.Empty) (*protos.GetBalancerTaskReply, error)
func (TasksServer) GetMoveTaskGroup ¶
func (t TasksServer) GetMoveTaskGroup(ctx context.Context, _ *emptypb.Empty) (*protos.GetMoveTaskGroupReply, error)
func (TasksServer) RemoveBalancerTask ¶
func (TasksServer) RemoveMoveTaskGroup ¶
func (TasksServer) WriteBalancerTask ¶
func (t TasksServer) WriteBalancerTask(ctx context.Context, request *protos.WriteBalancerTaskRequest) (*emptypb.Empty, error)
func (TasksServer) WriteMoveTaskGroup ¶
func (t TasksServer) WriteMoveTaskGroup(ctx context.Context, request *protos.WriteMoveTaskGroupRequest) (*emptypb.Empty, error)
type TopologyService ¶
type TopologyService struct { protos.UnimplementedTopologyServiceServer // contains filtered or unexported fields }
func NewTopologyService ¶
func NewTopologyService(impl coordinator.Coordinator) *TopologyService
func (*TopologyService) CloseRouter ¶
func (r *TopologyService) CloseRouter(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)
TODO : implement
func (*TopologyService) OpenRouter ¶
TODO : implement
func (*TopologyService) UpdateCoordinator ¶
func (r *TopologyService) UpdateCoordinator(ctx context.Context, in *protos.UpdateCoordinatorRequest) (*emptypb.Empty, error)
TODO : implement