clusterdomain

package
v9.4.47+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotImplemented is returned when domain API implementation is not supported
	ErrNotImplemented = errors.New("Not implemented")
	// ErrClusterDomainNotFound is returned when an unknown domain name is provided in the API
	ErrClusterDomainNotFound = errors.New("Cluster Domain not found")
	// ErrNoClusterDomainProvided is returned when any domain manager APIs are invoked but the
	// node is not started with any cluster domains
	ErrNoClusterDomainProvided = errors.New("node is not initialized with cluster domains")
)

Functions

func GetActiveMapFromClusterDomainInfos

func GetActiveMapFromClusterDomainInfos(clusterDomainInfos []*ClusterDomainInfo) types.ClusterDomainsActiveMap

GetActiveMapFromClusterDomainInfos is a helper function that converts a list of ClusterDomainInfo objects into a gossip cluster domain active map

Types

type ClusterDomainInfo

type ClusterDomainInfo struct {
	Name  string
	State types.ClusterDomainState
}

ClusterDomainInfo identifies a cluster domain in a cluster

func (*ClusterDomainInfo) Copy

type ClusterDomainProvider

type ClusterDomainProvider interface {
	// GetSelfDomain returns the cluster domain for this node
	GetSelfDomain() (*ClusterDomainInfo, error)

	// EnumerateDomains returns all the cluster domains in the cluster
	EnumerateDomains() ([]*ClusterDomainInfo, error)

	// Inspect returns the cluster domain info for the provided argument.
	InspectDomain(name string) (*ClusterDomainInfo, error)

	// DeleteDomain deletes a cluster domain entry
	DeleteDomain(name string) error

	// UpdateDomainState updates the state of cluster domain
	UpdateDomainState(name string, state types.ClusterDomainState) error
}

ClusterDomainProvider interface

func NewDefaultClusterDomainPorvider

func NewDefaultClusterDomainPorvider() ClusterDomainProvider

type NullClusterDomainManager

type NullClusterDomainManager struct{}

func (*NullClusterDomainManager) DeleteDomain

func (n *NullClusterDomainManager) DeleteDomain(name string) error

DeleteDomain deletes a cluster domain entry

func (*NullClusterDomainManager) EnumerateDomains

func (n *NullClusterDomainManager) EnumerateDomains() ([]*ClusterDomainInfo, error)

EnumerateDomains returns all the cluster domains in the cluster

func (*NullClusterDomainManager) GetSelfDomain

func (n *NullClusterDomainManager) GetSelfDomain() (*ClusterDomainInfo, error)

GetSelfDomain returns the cluster domain for this node

func (*NullClusterDomainManager) InspectDomain

func (n *NullClusterDomainManager) InspectDomain(name string) (*ClusterDomainInfo, error)

InspectDomain returns the cluster domain info for the provided argument.

func (*NullClusterDomainManager) UpdateDomainState

func (n *NullClusterDomainManager) UpdateDomainState(name string, state types.ClusterDomainState) error

UpdateDomainState sets the cluster domain info object into kvdb

Jump to

Keyboard shortcuts

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