cluster

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster interface {
	Start()
	Shutdown()
	Join(addr ...string) (int, error)
	Members() []Member
	MembersByReplicaSet(replicaSets ...uint64) []Member
	MemberByID(string) Member
	MemberByHash(uint64) Member
	ReplicaSet() uint64
	ServerID() []byte
	TotalReplicas() int
	Addr() string
	SetGatewayAddrs(hostPorts []string) error
	SetTunnelAddrs(hostPorts []string) error
	Subscribe(d Delegate)
}

type Delegate added in v0.7.4

type Delegate interface {
	OnJoin(hash uint64)
	OnLeave(hash uint64)
}

type Member

type Member interface {
	Proto(info *rony.Edge) *rony.Edge
	ServerID() string
	ReplicaSet() uint64
	GatewayAddr() []string
	TunnelAddr() []string
	Dial() (net.Conn, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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