conn

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ReaderBufferSize = 512 * 1024
	WriterBufferSize = 1 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisConn

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

func NewRedisConn

func NewRedisConn(cfg config.RedisConfig) (*RedisConn, error)

func (*RedisConn) Addresses

func (r *RedisConn) Addresses() []string

func (*RedisConn) BufioReader

func (r *RedisConn) BufioReader() *bufio.Reader

Reader is not thread safe

func (*RedisConn) BufioWriter

func (r *RedisConn) BufioWriter() *bufio.Writer

Writer is not thread safe

func (*RedisConn) Close

func (r *RedisConn) Close() error

func (*RedisConn) Do

func (r *RedisConn) Do(cmd string, args ...interface{}) (interface{}, error)

func (*RedisConn) Flush

func (r *RedisConn) Flush() error

func (*RedisConn) IterateNodes

func (r *RedisConn) IterateNodes(result func(string, interface{}, error), cmd string, args ...interface{})

func (*RedisConn) NewBatcher

func (r *RedisConn) NewBatcher() common.CmdBatcher

func (*RedisConn) Receive

func (r *RedisConn) Receive() (interface{}, error)

func (*RedisConn) ReceiveBool

func (r *RedisConn) ReceiveBool() (bool, error)

func (*RedisConn) ReceiveString

func (r *RedisConn) ReceiveString() (string, error)

func (*RedisConn) RedisType

func (r *RedisConn) RedisType() config.RedisType

func (*RedisConn) Send

func (r *RedisConn) Send(cmd string, args ...interface{}) error

@TODO 需要调用Flush吗?cluster模式并没有调用

func (*RedisConn) SendAndFlush

func (r *RedisConn) SendAndFlush(cmd string, args ...interface{}) error

Jump to

Keyboard shortcuts

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