plan

package
v1.0.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultNodeConfiguration applied on DNT enabled platforms
	DefaultNodeConfiguration = "default"

	// DefaultNodeCountPerZone is the legacy default nodecount per zone
	DefaultNodeCountPerZone = int32(1)
)

Variables

View Source
var DefaultScriptingSettings = map[string]*models.ElasticsearchScriptingUserSettings{
	"1": nil,
	"2": nil,
	"5": {
		Inline: &models.ElasticsearchScriptTypeSettings{
			Enabled:     ec.Bool(true),
			SandboxMode: ec.Bool(true),
		},
		Stored: &models.ElasticsearchScriptTypeSettings{
			Enabled:     ec.Bool(true),
			SandboxMode: ec.Bool(true),
		},
		File: &models.ElasticsearchScriptTypeSettings{
			Enabled:     ec.Bool(false),
			SandboxMode: ec.Bool(false),
		},
		ExpressionsEnabled: ec.Bool(true),
		MustacheEnabled:    ec.Bool(true),
		PainlessEnabled:    ec.Bool(true),
	},
	"6": nil,
	"7": nil,
}

DefaultScriptingSettings defaults to the scripting settings to be used.

Functions

func Cancel

func Cancel(params CancelParams) error

Cancel cancels the pending plan on the specified cluster.

func Get

Get returns either the current cluster plan or the pending plan.

func GetHistory

GetHistory returns the historic plan list

func NewLegacyPlan

func NewLegacyPlan(params LegacyParams) *models.ElasticsearchClusterPlan

NewLegacyPlan creates a new legacy plan from the parameters.

func Reapply

func Reapply(params ReapplyParams) (*models.ClusterCrudResponse, error)

Reapply will obtain the latest plan attempt and reapply it resetting all the transient settings, Any setting can be overridden if specified in the params.

func Update

func Update(params UpdateParams) (*models.ClusterCrudResponse, error)

Update applies (or validates) the given plan

Types

type CancelParams

type CancelParams struct{ util.ClusterParams }

CancelParams is used by Cancel

type GetHistoryParams

type GetHistoryParams struct{ util.ClusterParams }

GetHistoryParams is used by GetHistory

type GetParams

type GetParams struct {
	Pending bool
	util.ClusterParams
}

GetParams is used by Get

type LegacyParams

type LegacyParams struct {
	Plugins   []string
	Version   string
	ZoneCount int32
	Capacity  int32
}

LegacyParams represents the settings to create a simple cluster without a complex definition or split between data, master and ingest nodes.

type ReapplyParams

type ReapplyParams struct {
	*api.API
	planutil.ReapplyParams
	util.TrackParams

	SkipSnapshot         bool `kebabcase:"Skips snapshot on the reapplied plan"`
	SkipDataMigration    bool `` /* 181-byte string literal not displayed */
	SkipPostUpgradeSteps bool `` /* 148-byte string literal not displayed */
	SkipUpgradeChecker   bool `kebabcase:"Bypasses issue checks that should be resolved before migration (eg contains old Lucene segments)"`
}

ReapplyParams contains the parameters required to call a plan reapply action

func (ReapplyParams) Validate

func (params ReapplyParams) Validate() error

Validate ensures that the parameters are usable

type UpdateParams

type UpdateParams struct {
	*api.API
	ID           string
	ValidateOnly bool
	Plan         models.ElasticsearchClusterPlan

	util.TrackParams
}

UpdateParams is consumed by Update

func (UpdateParams) Validate

func (params UpdateParams) Validate() error

Validate ensures that the parameters are usable by the consuming function.

Jump to

Keyboard shortcuts

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