redis

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, address string) (*redis.Client, error)

Types

type ShardedClient

type ShardedClient interface {
	AddNode(ctx context.Context, address string) error
	RemoveNode(ctx context.Context, address string)
	GetShard(key string) (*redis.Client, error)
	Nodes() []string
	Close()
}

func NewShardedClient

func NewShardedClient(ctx context.Context, shardAddresses []string) (ShardedClient, error)

NewClient creates a new ShardedClient with given shard addresses

Directories

Path Synopsis
example
default command
shard command

Jump to

Keyboard shortcuts

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