controller

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGetClusterFailure = errors.New("failed to get cluster state")
	ErrGoalStateFailure  = errors.New("failed to establish goal state")
)

Functions

This section is empty.

Types

type ApplyBuilder

type ApplyBuilder interface {
	CreateApply(target model.ClusterState, step model.Step) runner.Runnable
}

type ClusterGetter

type ClusterGetter interface {
	// GetCluster returns the cluster or an error.
	GetCluster() (model.Cluster, error)
}

WorkspaceSelecter is something that can change get the current Cluster.

type ClusterGraph

type ClusterGraph interface {
	// GetResourcesForHost returns the resource dependencies or an error given a specific host
	GetResourcesForHost(hostname string) ([]string, error)
}

ClusterGraph is something that can get the resource dependencies of a specific host.

type Controller

type Controller interface {
	WorkspaceSelecter
	ClusterGetter
	Tainter
	ApplyBuilder
}

type Tainter

type Tainter interface {
	// TaintResources will mark the given resources as bad or returns an error.
	TaintResources(resources []string) error
	// TaintHost will mark a Host as bad or returns an error.
	TaintHost(hostname string) error
}

Tainter is something that can mark something as bad.

type WorkspaceSelecter

type WorkspaceSelecter interface {
	// SelectWorkspace changes the workspace used.
	// If an empty string is supplied, the current workspace is used.
	SelectWorkspace(workspace string) error
}

WorkspaceSelecter is something that can change the workspace.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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