executor

package
v0.450.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllResources []ResourceKind

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// Stage returns the stage that the executor belongs to.
	// Prepare prepares the executor for execution.
	Prepare(ctx context.Context, input State) error
	// Execute executes the executor, returning the next states.
	Execute(ctx context.Context) ([]State, error)
}

type Handler

type Handler struct {
	Executor Executor
	Handles  []State
}

type MySQLDBDoneState

type MySQLDBDoneState struct {
	MySQLInstanceReadyState
	Connector schema.DatabaseConnector
}

func (MySQLDBDoneState) DebugString

func (s MySQLDBDoneState) DebugString() string

type MySQLInputState

type MySQLInputState struct {
	ResourceID string
	Cluster    string
	Module     string
}

func (MySQLInputState) DebugString

func (s MySQLInputState) DebugString() string

func (MySQLInputState) Kind

func (s MySQLInputState) Kind() ResourceKind

type MySQLInstanceReadyState

type MySQLInstanceReadyState struct {
	MySQLInputState

	MasterUserSecretARN string
	WriteEndpoint       string
	ReadEndpoint        string
}

func (MySQLInstanceReadyState) DebugString

func (s MySQLInstanceReadyState) DebugString() string

type PostgresDBDoneState

type PostgresDBDoneState struct {
	PostgresInstanceReadyState
	Connector schema.DatabaseConnector
}

func (PostgresDBDoneState) DebugString

func (s PostgresDBDoneState) DebugString() string

type PostgresInputState

type PostgresInputState struct {
	ResourceID string
	Cluster    string
	Module     string
}

func (PostgresInputState) DebugString

func (s PostgresInputState) DebugString() string

func (PostgresInputState) Kind

type PostgresInstanceReadyState

type PostgresInstanceReadyState struct {
	PostgresInputState

	MasterUserSecretARN string
	WriteEndpoint       string
	ReadEndpoint        string
}

func (PostgresInstanceReadyState) DebugString

func (s PostgresInstanceReadyState) DebugString() string

type ProvisionRunner

type ProvisionRunner struct {
	CurrentState []State
	Stages       []RunnerStage
	// contains filtered or unexported fields
}

func (*ProvisionRunner) Run

func (r *ProvisionRunner) Run(ctx context.Context) ([]State, error)

type ResourceKind

type ResourceKind string
const (
	ResourceKindPostgres ResourceKind = "postgres"
	ResourceKindMySQL    ResourceKind = "mysql"
)

type RunnerStage

type RunnerStage struct {
	Name      string
	Executors []Handler
}

type State

type State interface {
	DebugString() string
}

State of a single resource in execution.

Jump to

Keyboard shortcuts

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