client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START = 0
	RUN   = 1
	END   = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterClient

type ClusterClient struct {
	Raddress string

	Status int
	// contains filtered or unexported fields
}

func NewClusterClient

func NewClusterClient(host string, port int) *ClusterClient

func NewClusterClient2

func NewClusterClient2(addr string) *ClusterClient

func (*ClusterClient) Live

func (this *ClusterClient) Live(address []string) (int, error)

func (*ClusterClient) Start

func (this *ClusterClient) Start(handler HandlerFunc, messageHandler MessageHandlerFunc, sendUserHandlerFunc SendUserHandlerFunc)

func (*ClusterClient) Write

func (this *ClusterClient) Write(msg []byte) (int, error)

type HandlerFunc

type HandlerFunc func(*ClusterClient, int)

type MessageHandlerFunc

type MessageHandlerFunc func(*ClusterClient, *message.Message, string) error

type SendUserHandlerFunc

type SendUserHandlerFunc func(*ClusterClient, string, int)

Jump to

Keyboard shortcuts

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