instances

package
v1.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package instances contains all of the elasticsearch instance actions that can be performed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(params util.ClusterParams) ([]string, error)

List returns a slice with the Elasticsearch instance names in it.

func Pause

func Pause(params Params) error

Pause stops specific cluster instances

func Resume

func Resume(params Params) error

Resume starts specific cluster instances

func StartRouting

func StartRouting(params Params) error

StartRouting starts routing on specific cluster instances

func StopRouting

func StopRouting(params Params) error

StopRouting stops routing on specific cluster instances

Types

type OverrideCapacityParams

type OverrideCapacityParams struct {
	util.ClusterParams
	Instances         []string
	Value             uint64
	StorageMultiplier int64
	BoostFactor       uint8
	Reset             bool
}

OverrideCapacityParams is used by OverrideCapacity

func (OverrideCapacityParams) Validate

func (params OverrideCapacityParams) Validate() error

Validate ensures that the parameters are usable by the consuming function

type OverrideRequest

type OverrideRequest struct {
	StorageMultiplier int64
	Capacity          int32
	Instances         []string
}

OverrideRequest is used in a SetEsClusterInstancesSettingsOverrides call to override any ES settings.

func NewOverrideRequest

func NewOverrideRequest(instances []*models.ClusterInstanceInfo, size TopologySize, newValue int32, filter []string) OverrideRequest

NewOverrideRequest receives a list of instances, the Topology size and the new value to be used factor and returns the Override request that has to be sent to the API. Any instances that don't match the TopologySize will be ignored.

type OverrideResponse

type OverrideResponse OverrideRequest

OverrideResponse is returned by OverrideCapacity

func OverrideCapacity

func OverrideCapacity(params OverrideCapacityParams) ([]OverrideResponse, error)

OverrideCapacity performs a series of capacity overrides to a series of Elasticsearch cluster instances. If no Instances are specified, the whole cluster's instances are boosted from the passed multiplier. Takes into account different topologies inside the same cluster, individually boosting different capacities.

type Params

type Params struct {
	util.ClusterParams
	Instances []string
}

Params is consumed both vby by Resume and Pause.

type TopologySize

type TopologySize struct {
	ID   string
	Size int32
}

TopologySize defines an instance configuration ID with the current size.

func GetSizeFromTopology

func GetSizeFromTopology(topology *models.ElasticsearchClusterTopologyElement) (TopologySize, error)

GetSizeFromTopology attempts to obtain the defined topology size of an Elasticsearch cluster, returning an error if the size cannot be obtained.

Jump to

Keyboard shortcuts

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