cluster

package
v0.0.69 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdClient

func NewEtcdClient() *clientv3.Client

func SendRequest added in v0.0.69

func SendRequest(client *client.Http, user *authentication.User, URL string, data string) *contracts.ResponseImplementation

Types

type Cluster

type Cluster struct {
	Node       *Node
	Cluster    []string
	Client     *client.Http
	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(agent string)

func (*Cluster) ListenObjects added in v0.0.69

func (c *Cluster) ListenObjects(agent string)

func (*Cluster) ListenUpdates added in v0.0.65

func (c *Cluster) ListenUpdates(agent string)

func (*Cluster) Remove

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

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