cluster

package
v0.0.63 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdClient

func NewEtcdClient() *clientv3.Client

Types

type Cluster

type Cluster struct {
	Node       *Node
	Cluster    []string
	EtcdClient *clientv3.Client
	KVStore    *raft.KVStore
	RaftNode   *raft.RaftNode
}

func New

func New(body io.ReadCloser) (*Cluster, error)

func Restore

func Restore(config *configuration.Configuration) (*Cluster, error)

func (*Cluster) Add

func (c *Cluster) Add(node *Node)

func (*Cluster) ConfigureFlannel

func (c *Cluster) ConfigureFlannel(network string) error

func (*Cluster) ListenEvents

func (c *Cluster) ListenEvents()

func (*Cluster) Remove

func (c *Cluster) Remove(node *Node)

func (*Cluster) Start

func (c *Cluster) Start(body io.ReadCloser)

func (*Cluster) StartSingleNodeEtcd

func (c *Cluster) StartSingleNodeEtcd(config *configuration.Configuration) (e *embed.Etcd, err error)

type Node

type Node struct {
	NodeID uint64
	URL    string
}

func NewNode

func NewNode(nodeID string, URL string) (*Node, error)

func NewNodeRequest

func NewNodeRequest(body io.ReadCloser) (*Node, error)

Jump to

Keyboard shortcuts

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