operator

package
v0.0.0-...-21498a3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operator

type Operator interface {
	// Create creates a new cluster on the given provider based on the configuration and returns the same cluster enriched with its current state.
	Create(p types.ProviderType, cfg map[string]interface{}) (*types.ClusterInfo, error)
	// Status checks the cluster status based on the given state.
	// If the state is empty or nil, Status will attempt to load the state from the file system.
	Status(info *types.ClusterInfo, p types.ProviderType, cfg map[string]interface{}) (*types.ClusterStatus, error)
	// Delete removes a cluster. For this operation a valid state is necessary.
	// If the state is empty or nil, Delete will attempt to load the state from the file system.
	Delete(info *types.ClusterInfo, p types.ProviderType, cfg map[string]interface{}) error
}

Operator allows switching easily between different types of provisioning operators.

type Type

type Type string

Type points out the type of the operator.

const (
	NativeOperator Type = "native"
)

type Unknown

type Unknown struct {
}

Unknown represents an invalid operator.

func (*Unknown) Create

func (u *Unknown) Create(p types.ProviderType, cfg map[string]interface{}) (*types.ClusterInfo, error)

Create returns an error if the operator is unknown.

func (*Unknown) Delete

func (u *Unknown) Delete(info *types.ClusterInfo, p types.ProviderType, cfg map[string]interface{}) error

Delete returns an error if the operator is unknown.

func (*Unknown) Status

func (u *Unknown) Status(info *types.ClusterInfo, p types.ProviderType, cfg map[string]interface{}) (*types.ClusterStatus, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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