cluster

package
v0.2.26 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 17 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 NewCluster

func NewCluster(logger *logrus.Logger, serviceDiscovery ServiceDiscovery, namespace, ServiceName, httpAddr string) *Cluster

func (*Cluster) Hosts

func (c *Cluster) Hosts() []string

func (*Cluster) Init

func (c *Cluster) Init() error

func (*Cluster) InitKubeClient added in v0.2.11

func (c *Cluster) InitKubeClient() error

func (*Cluster) LeaderChanged

func (c *Cluster) LeaderChanged(isLeader bool)

func (*Cluster) NodeID

func (c *Cluster) NodeID() string

func (*Cluster) RaftAddr added in v0.1.16

func (c *Cluster) RaftAddr() string

func (*Cluster) UpdateServiceEndpointSlice

func (c *Cluster) UpdateServiceEndpointSlice() error

type Joiner

type Joiner struct {
	// contains filtered or unexported fields
}

func NewJoiner

func NewJoiner(logger *logrus.Logger, nodeID, raftAddr string, hosts []string) *Joiner

func (*Joiner) Join

func (j *Joiner) Join() error

type ServiceDiscovery added in v0.2.5

type ServiceDiscovery interface {
	Lookup() ([]string, error)
	IP() (string, error)
	Hostname() (string, error)
}

type ServiceDiscoverySRV added in v0.2.5

type ServiceDiscoverySRV struct {
	// contains filtered or unexported fields
}

func NewServiceDiscoverySRV added in v0.2.5

func NewServiceDiscoverySRV(namespace, serviceName string) *ServiceDiscoverySRV

func (*ServiceDiscoverySRV) Hostname added in v0.2.5

func (s *ServiceDiscoverySRV) Hostname() (string, error)

func (*ServiceDiscoverySRV) IP added in v0.2.5

func (s *ServiceDiscoverySRV) IP() (string, error)

func (*ServiceDiscoverySRV) Lookup added in v0.2.5

func (s *ServiceDiscoverySRV) Lookup() ([]string, error)

Jump to

Keyboard shortcuts

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