actions

package
v0.0.0-...-e59334c Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_COMPRESS bool = true

DEFAULT_COMPRESS is the default option for the compress option

View Source
const DEFAULT_HEALTH_CHECK_INTERVAL int64 = 30
View Source
const DEFAULT_MAX_RESTORE_BYTES_PER_SECOND string = "20mb"

DEFAULT_MAX_RESTORE_BYTES_PER_SECOND is the default option for the max_restore_bytes_per_second option

View Source
const DEFAULT_MAX_SNAPSHOT_BYTES_PER_SECOND string = "20mb"

DEFAULT_MAX_SNAPSHOT_BYTES_PER_SECOND is the default option for the max_snapshot_bytes_per_second option

View Source
const DEFAULT_MAX_WAIT int = 3600

DEFAULT_MAX_WAIT default max_wait option

View Source
const DEFAULT_VERIFY bool = true

DEFAULT_VERIFY is the default value for the verify option

View Source
const DEFAULT_WAIT_FOR_COMPLETION bool = true

DEFAULT_WAIT_FOR_COMPLETION default wait_for_completion option

View Source
const DEFAULT_WAIT_INTERVAL int = 9

DEFAULT_WAIT_INTERVAL default wait_interval option

View Source
const FAILED_STATUS string = "FAILED"

FAILED_STATUS elasticsearch snapshot state

View Source
const INDEX_ACTION_TYPE string = "index"

INDEX_ACTION_TYPE (self explanatory)

View Source
const INSERT_LIMIT int = 250
View Source
const IN_PROGRESS_STATUS string = "IN_PROGRESS"

IN_PROGRESS_STATUS elasticsearch snapshot state

View Source
const PARTIAL_STATUS string = "PARTIAL"

PARTIAL_STATUS elasticsearch snapshot state

View Source
const SECONDS_IN_A_DAY int64 = 86400

SECONDS_IN_A_DAY (self explanatory)

View Source
const SECONDS_IN_A_MONTH int64 = 2628000

SECONDS_IN_A_MONTH (self explanatory)

View Source
const SECONDS_IN_A_YEAR int64 = 31540000

SECONDS_IN_A_YEAR (self explanatory)

View Source
const SNAPSHOT_ACTION_TYPE string = "snapshot"

SNAPSHOT_ACTION_TYPE (self explanatory)

View Source
const SUCCESS_STATUS string = "SUCCESS"

SUCCESS_STATUS elasticsearch snapshot state

View Source
const THRESHOLD int64 = 4

THRESHOLD represents the number of concurrent tasks that need to be executed

Variables

This section is empty.

Functions

This section is empty.

Types

type Actionable

type Actionable interface {
	// Init prepares an action for execution
	Init(
		context contexts.Contextable,
		logger *logger.Logger,
		builder *golastic.Connection,
		queue *notifications.Queue,
		ctx context.Context,
	) error

	// Perform executes the action
	Perform() Actionable

	// ApllyFilter applies different filters
	// through filter runners in order to
	// get an actionable list of indices
	// or snapshots to perform an action
	ApplyFilters() error

	// HasErrors checks if errors occurred
	// while applying the filters to get
	// an actionable list
	HasErrors() bool

	// ApplyOptions applies the action's options
	// prior to performing the given action
	ApplyOptions() Actionable

	// DisableAction prevents the
	// action to be performed
	DisableAction() bool

	// List returns the actionable list
	List() []string

	// Disconnect releases resources used
	// for performing the given action
	Disconnect()

	// Notify issues a notification regarding the execution
	// of an action over an actionable list
	Notify() error
}

Actionable represents the contract to be implemented by actions to be performed on an actionable list of indices or snapshots

func Create

func Create(
	context contexts.Contextable,
	logger *logger.Logger,
	connection *golastic.Connection,
	queue *notifications.Queue,
	ctx context.Context,
) (Actionable, error)

Create builds an Actionable action

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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