cluster

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 16 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(
	serviceDiscovery ServiceDiscovery,
	namespace, ServiceName,
	raftAddr string,
	httpAddr string,
) *Cluster

func (*Cluster) Hosts

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

func (*Cluster) Init

func (c *Cluster) Init() error

func (*Cluster) InitKubeClient

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

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(nodeID, raftAddr string, hosts []string) *Joiner

func (*Joiner) Join

func (j *Joiner) Join() error

type ServiceDiscovery

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

type ServiceDiscoverySRV

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

func NewServiceDiscoverySRV

func NewServiceDiscoverySRV(namespace, serviceName string) *ServiceDiscoverySRV

func (*ServiceDiscoverySRV) Hostname

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

func (*ServiceDiscoverySRV) IP

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

func (*ServiceDiscoverySRV) Lookup

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

Jump to

Keyboard shortcuts

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