cluster

package
v0.0.0-...-5c6c1e7 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MasterType       = "master"
	VolumeServerType = "volumeServer"
	FilerType        = "filer"
	BrokerType       = "broker"
)

Variables

This section is empty.

Functions

func ListExistingPeerUpdates

func ListExistingPeerUpdates(master pb.ServerAddress, grpcDialOption grpc.DialOption, filerGroup string, clientType string) (existingNodes []*master_pb.ClusterNodeUpdate)

Types

type Cluster

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

func NewCluster

func NewCluster() *Cluster

func (*Cluster) AddClusterNode

func (cluster *Cluster) AddClusterNode(ns, nodeType string, dataCenter DataCenter, rack Rack, address pb.ServerAddress, version string) []*master_pb.KeepConnectedResponse

func (*Cluster) IsOneLeader

func (cluster *Cluster) IsOneLeader(filerGroup FilerGroupName, nodeType string, address pb.ServerAddress) bool

func (*Cluster) ListClusterNode

func (cluster *Cluster) ListClusterNode(filerGroup FilerGroupName, nodeType string) (nodes []*ClusterNode)

func (*Cluster) ListClusterNodeLeaders

func (cluster *Cluster) ListClusterNodeLeaders(filerGroup FilerGroupName, nodeType string) (nodes []pb.ServerAddress)

func (*Cluster) RemoveClusterNode

func (cluster *Cluster) RemoveClusterNode(ns string, nodeType string, address pb.ServerAddress) []*master_pb.KeepConnectedResponse

type ClusterNode

type ClusterNode struct {
	Address pb.ServerAddress
	Version string

	CreatedTs  time.Time
	DataCenter DataCenter
	Rack       Rack
	// contains filtered or unexported fields
}

type ClusterNodeGroups

type ClusterNodeGroups struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*ClusterNodeGroups) AddClusterNode

func (g *ClusterNodeGroups) AddClusterNode(filerGroup FilerGroupName, nodeType string, dataCenter DataCenter, rack Rack, address pb.ServerAddress, version string) []*master_pb.KeepConnectedResponse

func (*ClusterNodeGroups) IsOneLeader

func (g *ClusterNodeGroups) IsOneLeader(filerGroup FilerGroupName, address pb.ServerAddress) bool

func (*ClusterNodeGroups) ListClusterNode

func (g *ClusterNodeGroups) ListClusterNode(filerGroup FilerGroupName) (nodes []*ClusterNode)

func (*ClusterNodeGroups) ListClusterNodeLeaders

func (g *ClusterNodeGroups) ListClusterNodeLeaders(filerGroup FilerGroupName) (nodes []pb.ServerAddress)

func (*ClusterNodeGroups) RemoveClusterNode

func (g *ClusterNodeGroups) RemoveClusterNode(filerGroup FilerGroupName, nodeType string, address pb.ServerAddress) []*master_pb.KeepConnectedResponse

type DataCenter

type DataCenter string

type FilerGroupName

type FilerGroupName string

type GroupMembers

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

type Leaders

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

func (*Leaders) GetLeaders

func (leaders *Leaders) GetLeaders() (addresses []pb.ServerAddress)

type Rack

type Rack string

Jump to

Keyboard shortcuts

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