gossipCluster

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: BSD-3-Clause Imports: 14 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 struct {
	// contains filtered or unexported fields
}

func New

func New(dataPath string, cfg Config) *Cluster

func (*Cluster) Addr

func (c *Cluster) Addr() string

func (*Cluster) Join

func (c *Cluster) Join(addr ...string) (int, error)

func (*Cluster) Leave added in v0.12.15

func (c *Cluster) Leave() error

func (*Cluster) MemberByHash added in v0.7.4

func (c *Cluster) MemberByHash(h uint64) rony.ClusterMember

func (*Cluster) MemberByID added in v0.7.4

func (c *Cluster) MemberByID(serverID string) rony.ClusterMember

func (*Cluster) Members

func (c *Cluster) Members() []rony.ClusterMember

func (*Cluster) MembersByReplicaSet added in v0.7.2

func (c *Cluster) MembersByReplicaSet(replicaSets ...uint64) []rony.ClusterMember

func (*Cluster) ReplicaSet

func (c *Cluster) ReplicaSet() uint64

func (*Cluster) ServerID added in v0.7.4

func (c *Cluster) ServerID() string

func (*Cluster) SetGatewayAddrs

func (c *Cluster) SetGatewayAddrs(hostPorts []string) error

func (*Cluster) SetTunnelAddrs added in v0.5.20

func (c *Cluster) SetTunnelAddrs(hostPorts []string) error

func (*Cluster) Shutdown

func (c *Cluster) Shutdown()

func (*Cluster) Start

func (c *Cluster) Start() error

func (*Cluster) Subscribe added in v0.7.4

func (c *Cluster) Subscribe(d rony.ClusterDelegate)

func (*Cluster) TotalReplicas added in v0.5.20

func (c *Cluster) TotalReplicas() int

type Config

type Config struct {
	ServerID       []byte
	Bootstrap      bool
	ReplicaSet     uint64
	GossipIP       string
	GossipPort     int
	AdvertisedIP   string
	AdvertisedPort int
	Logger         log.Logger
}

type Member

type Member struct {
	ClusterAddr net.IP
	ClusterPort uint16
	// contains filtered or unexported fields
}

func (*Member) Dial added in v0.7.3

func (m *Member) Dial() (net.Conn, error)

func (*Member) GatewayAddr

func (m *Member) GatewayAddr() []string

func (*Member) Merge added in v0.6.16

func (m *Member) Merge(en *msg.EdgeNode)

func (*Member) Proto

func (m *Member) Proto(p *rony.Edge) *rony.Edge

func (*Member) ReplicaSet

func (m *Member) ReplicaSet() uint64

func (*Member) ServerID

func (m *Member) ServerID() string

func (*Member) TunnelAddr added in v0.5.20

func (m *Member) TunnelAddr() []string

Jump to

Keyboard shortcuts

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