Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface {
ExecuteWrite(ctx context.Context, request *proto.WriteRequest) (*proto.WriteResponse, error)
ExecuteRead(ctx context.Context, request *proto.ReadRequest) (proto.OxiaClient_ReadClient, error)
ExecuteList(ctx context.Context, request *proto.ListRequest) (proto.OxiaClient_ListClient, error)
ExecuteRangeScan(ctx context.Context, request *proto.RangeScanRequest) (proto.OxiaClient_RangeScanClient, error)
}
func NewExecutor ¶ added in v0.7.0
func NewExecutor(ctx context.Context, namespace string, pool common.ClientPool, manager ShardManager, serviceAddress string) Executor
type ShardManager ¶
type ShardManager interface {
io.Closer
Get(key string) int64
GetAll() []int64
Leader(shardId int64) string
}
func NewShardManager ¶
func NewShardManager(shardStrategy ShardStrategy, clientPool common.ClientPool, serviceAddress string, namespace string, requestTimeout time.Duration) (ShardManager, error)
type ShardStrategy ¶
func NewShardStrategy ¶
func NewShardStrategy() ShardStrategy
Source Files
¶
Click to show internal directories.
Click to hide internal directories.