network

package
v0.0.0-...-fd6c416 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: GPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClosed is the error resulting if the pool is closed via pool.Close().
	ErrClosed = errors.New("pool is closed")
)

Functions

This section is empty.

Types

type ClusterPool

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

ClusterPool struct

func (*ClusterPool) AddNode

func (c *ClusterPool) AddNode(node string) error

AddNode add new node when redis ASK/MOVED/initialize

func (*ClusterPool) Write

func (c *ClusterPool) Write(index int, msg []byte) ([]byte, error)

Write write message into connection

type Factory

type Factory func() (net.Conn, error)

Factory is a function to create new connections.

type NetCommands

type NetCommands interface {
	Write(index int, msg []byte) ([]byte, error)
	AddNode(node string) error
}

NetCommands network interface

func New

func New() NetCommands

New create network ^-^

Jump to

Keyboard shortcuts

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