serf

package
v0.0.0-...-0369387 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Zlib Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterService

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

ClusterService is a service used to manage cluster related actions such as joining the cluster, retrieving members in the clusters...

func NewClusterService

func NewClusterService(runtimeConfiguration *agent.RuntimeConfig) *ClusterService

NewClusterService returns a pointer to a ClusterService.

func (*ClusterService) Create

func (service *ClusterService) Create(advertiseAddr string, joinAddr []string, probeTimeout, probeInterval time.Duration) error

Create will create the agent configuration and automatically join the cluster.

func (*ClusterService) GetMemberByNodeName

func (service *ClusterService) GetMemberByNodeName(nodeName string) *agent.ClusterMember

GetMemberByNodeName will return the first member with the specified node name.

func (*ClusterService) GetMemberByRole

func (service *ClusterService) GetMemberByRole(role agent.DockerNodeRole) *agent.ClusterMember

GetMemberByRole will return the first member with the specified role.

func (*ClusterService) GetMemberWithEdgeKeySet

func (service *ClusterService) GetMemberWithEdgeKeySet() *agent.ClusterMember

GetMemberWithEdgeKeySet will return the first member with the EdgeKeySet tag set.

func (*ClusterService) GetRuntimeConfiguration

func (service *ClusterService) GetRuntimeConfiguration() *agent.RuntimeConfig

GetRuntimeConfiguration returns the runtimeConfiguration associated to the service

func (*ClusterService) Leave

func (service *ClusterService) Leave()

Leave leaves the cluster.

func (*ClusterService) Members

func (service *ClusterService) Members() []agent.ClusterMember

Members returns the list of cluster members.

func (*ClusterService) UpdateRuntimeConfiguration

func (service *ClusterService) UpdateRuntimeConfiguration(runtimeConfiguration *agent.RuntimeConfig) error

UpdateRuntimeConfiguration propagate the new runtimeConfiguration to the cluster

Jump to

Keyboard shortcuts

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