actions

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterVersionUpgradeAction = "rack-version-upgrade"
)
View Source
const RackCreateAction = "rack-create"
View Source
const RackScaleDownAction = "rack-scale-down"
View Source
const RackScaleUpAction = "rack-scale-up"

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	// Name returns the action's name.
	// Useful for unit-testing.
	Name() string

	// Execute will execute the action using the
	// ClusterController to read and write the
	// state of the system.
	Execute(ctx context.Context, s *State) error
}

Action represents a discrete action that a scylla rack can take. This can be a rack creation,

type ClusterVersionUpgrade

type ClusterVersionUpgrade struct {
	Cluster *scyllav1alpha1.Cluster
	// contains filtered or unexported fields
}

func NewClusterVersionUpgradeAction

func NewClusterVersionUpgradeAction(c *scyllav1alpha1.Cluster, l log.Logger) *ClusterVersionUpgrade

func (*ClusterVersionUpgrade) Execute

func (a *ClusterVersionUpgrade) Execute(ctx context.Context, s *State) error

func (*ClusterVersionUpgrade) Name

func (a *ClusterVersionUpgrade) Name() string

type RackCreate

type RackCreate struct {
	Rack          scyllav1alpha1.RackSpec
	Cluster       *scyllav1alpha1.Cluster
	OperatorImage string
}

func NewRackCreateAction

func NewRackCreateAction(r scyllav1alpha1.RackSpec, c *scyllav1alpha1.Cluster, image string) *RackCreate

func (*RackCreate) Execute

func (a *RackCreate) Execute(ctx context.Context, s *State) error

func (*RackCreate) Name

func (a *RackCreate) Name() string

type RackScaleDown

type RackScaleDown struct {
	Rack    scyllav1alpha1.RackSpec
	Cluster *scyllav1alpha1.Cluster
}

func (*RackScaleDown) Execute

func (a *RackScaleDown) Execute(ctx context.Context, s *State) error

func (*RackScaleDown) Name

func (a *RackScaleDown) Name() string

type RackScaleUp

type RackScaleUp struct {
	Rack    scyllav1alpha1.RackSpec
	Cluster *scyllav1alpha1.Cluster
}

func (*RackScaleUp) Execute

func (a *RackScaleUp) Execute(ctx context.Context, s *State) error

func (*RackScaleUp) Name

func (a *RackScaleUp) Name() string

type State

type State struct {
	// Dynamic client - uses caching for lookups
	client.Client
	// contains filtered or unexported fields
}

State contains tools to discover and modify the state of the world.

func NewState

func NewState(client client.Client, kubeclient kubernetes.Interface, recorder record.EventRecorder) *State

Jump to

Keyboard shortcuts

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