discovery

package
v0.0.0-...-5a6e01e Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package discovery supports suffrage nodes network.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadNodeChannel

func LoadNodeChannel(
	connInfo network.ConnInfo,
	encs *encoder.Encoders,
	connectionTimeout time.Duration,
) (network.Channel, error)

Types

type Discovery

type Discovery interface {
	util.Daemon
	LenNodes() int
	Nodes() []NodeConnInfo
	SetNotifyJoin(func(NodeConnInfo)) Discovery
	SetNotifyLeave(func(NodeConnInfo, []NodeConnInfo)) Discovery
	SetNotifyUpdate(func(NodeConnInfo)) Discovery
}

type NodeConnInfo

type NodeConnInfo interface {
	network.ConnInfo
	Node() base.Address
}

type NodepoolDelegate

type NodepoolDelegate struct {
	sync.Mutex
	*logging.Logging
	// contains filtered or unexported fields
}

func NewNodepoolDelegate

func NewNodepoolDelegate(
	nodepool *network.Nodepool,
	encs *encoder.Encoders,
	connectionTimeout time.Duration,
) *NodepoolDelegate

func (*NodepoolDelegate) NotifyJoin

func (dg *NodepoolDelegate) NotifyJoin(ci NodeConnInfo)

func (*NodepoolDelegate) NotifyLeave

func (dg *NodepoolDelegate) NotifyLeave(ci NodeConnInfo, lefts []NodeConnInfo)

func (*NodepoolDelegate) NotifyUpdate

func (dg *NodepoolDelegate) NotifyUpdate(ci NodeConnInfo)

Directories

Path Synopsis
Package memberlist provides node discovery and failed nodes detection by hashicorp/memberlist.
Package memberlist provides node discovery and failed nodes detection by hashicorp/memberlist.

Jump to

Keyboard shortcuts

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