commands

package
v0.0.0-...-3442565 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CommandFilename = "_command.json"
View Source
const EtcdClusterCreated = "etcd-cluster-created"
View Source
const EtcdClusterSpec = "etcd-cluster-spec"

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Data() protoetcd.Command
}

type Store

type Store interface {
	// IsNewCluster indicates if it is safe to create a new cluster
	IsNewCluster() (bool, error)

	// MarkClusterCreated marks the cluster as having been created, so IsNewCluster will return false
	MarkClusterCreated() error

	// GetExpectedClusterSpec gets the expected cluster spec
	GetExpectedClusterSpec() (*protoetcd.ClusterSpec, error)
	// SetExpectedClusterSpec updates the expected cluster spec
	SetExpectedClusterSpec(spec *protoetcd.ClusterSpec) error

	// AddCommand adds a command to the back of the queue
	AddCommand(cmd *protoetcd.Command) error

	// ListCommands returns all the external commands that have not been removed
	ListCommands() ([]Command, error)

	// RemoveCommand marks a command as complete
	RemoveCommand(command Command) error
}

func NewStore

func NewStore(storage string) (Store, error)

func NewVFSStore

func NewVFSStore(p vfs.Path) (Store, error)

Jump to

Keyboard shortcuts

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