Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoNodes = errors.New("no nodes available") ErrNodeNotFound = errors.New("node not found") )
Functions ¶
Types ¶
type ShardedClient ¶
type ShardedClient struct {
// contains filtered or unexported fields
}
func NewShardedClient ¶
func NewShardedClient(ctx context.Context, shardAddresses []string) (*ShardedClient, error)
func (*ShardedClient) AddNode ¶
func (rsc *ShardedClient) AddNode(ctx context.Context, address string) error
func (*ShardedClient) Close ¶
func (rsc *ShardedClient) Close()
func (*ShardedClient) GetShard ¶
func (rsc *ShardedClient) GetShard(key string) (*redis.Client, error)
func (*ShardedClient) Nodes ¶
func (rsc *ShardedClient) Nodes() []string
func (*ShardedClient) RemoveNode ¶
func (rsc *ShardedClient) RemoveNode(ctx context.Context, address string)
Click to show internal directories.
Click to hide internal directories.