labelmanager

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundExecutor = errors.New("Not found Executor")
)

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	// e.g. terminus-y
	ClusterName string
	// One of the following options:
	// ServiceKindMarathon
	// ServiceKindK8S
	// JobKindMetronome
	// JobKindK8S
	ClusterType string
	// This can be ignored for k8s cluster
	SoldierURL string
}

type LabelManager

type LabelManager interface {
	// List available labels.
	// map key: label name
	// map value: Is this label a prefix?
	//
	// Although different types of
	// clusters (dcos&k8s) have different names on the compute
	// nodes, the exposed labels are uniform names.
	List() map[string]bool

	// Not yet implemented
	SetNodeLabel(cluster Cluster, hosts []string, tags map[string]string) error
}

LabelManager interface of LabelManagerImpl

func NewLabelManager

func NewLabelManager() LabelManager

NewLabelManager create LabelManager

type LabelManagerImpl

type LabelManagerImpl struct{}

LabelManagerImpl implementation of LabelManager

func (*LabelManagerImpl) List

func (s *LabelManagerImpl) List() map[string]bool

func (*LabelManagerImpl) SetNodeLabel

func (s *LabelManagerImpl) SetNodeLabel(cluster Cluster, hosts []string, tags map[string]string) error

Jump to

Keyboard shortcuts

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