cluster

package
v0.0.0-...-c3f54fb Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Send(command [][]byte) (protocol.Reply, error)
}

type Cluster

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

func NewCluster

func NewCluster() *Cluster

func (*Cluster) Close

func (cluster *Cluster) Close()

func (*Cluster) Exec

func (cluster *Cluster) Exec(c common.Connection, redisCommand [][]byte) (result protocol.Reply)

func (*Cluster) ForEach

func (cluster *Cluster) ForEach(dbIndex int, cb func(key string, data *payload.DataEntity, expiration *time.Time) bool)

func (*Cluster) Relay

func (cluster *Cluster) Relay(peer string, conn common.Connection, redisCommand [][]byte) protocol.Reply

type CmdLine

type CmdLine = [][]byte

type Factory

type Factory interface {
	GetConn(addr string) (Client, error)
	ReturnConn(peer string, cli Client) error
}

type RedisConnPool

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

func NewRedisConnPool

func NewRedisConnPool() *RedisConnPool

func (*RedisConnPool) GetConn

func (r *RedisConnPool) GetConn(addr string) (Client, error)

func (*RedisConnPool) ReturnConn

func (r *RedisConnPool) ReturnConn(peer string, cli Client) error

type Transaction

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

func NewTransaction

func NewTransaction(txId string, cmdLine [][]byte, cluster *Cluster, c common.Connection) *Transaction

Jump to

Keyboard shortcuts

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