cluster

package
v0.0.0-...-15f65a9 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config Config) (*cluster, error)

Types

type Cluster

type Cluster interface {
	Shutdown() error
	FindNode(key string) (Node, error)
	Peers() []Node
	AuthToken() string

	// Returns its own node ID
	NodeId() string

	// Returns the number of nodes in the cluster
	Size() int
}

type Config

type Config struct {
	NodeId     string
	Membership membership.Membership
	Logger     logging.Logger
	Metrics    metrics.Metrics
	Debug      bool
	RpcAddr    string
	AuthToken  string
}

type Node

type Node struct {
	Id      string
	RpcAddr string
}

Jump to

Keyboard shortcuts

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