transport

package
v0.0.0-...-a4c726f Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClosedClient = errors.New("closed client")

ErrClosedClient error

Functions

This section is empty.

Types

type RadixPool

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

RadixPool struct

func NewRadixPool

func NewRadixPool(addr string, size int, password *string) (*RadixPool, error)

NewRadixPool return radix pool dialer with provided pool size.

func (*RadixPool) Close

func (rad *RadixPool) Close() error

Close closes all connections in the pool and rejects future execution calls. Blocks until all streams are closed.

func (*RadixPool) Execute

func (rad *RadixPool) Execute(command string, args ...string) ([]byte, error)

Execute command

func (*RadixPool) ExecuteStream

func (rad *RadixPool) ExecuteStream(ctx context.Context, handler func([]byte) error, command string, args ...string) error

ExecuteStream used for commands with streaming response. Creates a new connection for each stream.

Jump to

Keyboard shortcuts

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