apm

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultZoneCount is the number of zones that a Apm has by default.
	DefaultZoneCount = 1
	// DefaultMemoryPerNode is the default memory per node.
	DefaultMemoryPerNode = 512
)

Variables

This section is empty.

Functions

func CancelPlan

func CancelPlan(params PlanParams) error

CancelPlan cancels the pending plan on the specified cluster.

func Delete

func Delete(params DeleteParams) error

Delete deletes an APM.

func GetPlan

func GetPlan(params PlanParams) (*models.ApmPlansInfo, error)

GetPlan returns the plan information (if any) of a cluster

func List

func List(params ListParams) (*models.ApmsInfo, error)

List returns all of the matching APM clusters.

func ListPlanHistory

func ListPlanHistory(params PlanParams) ([]*models.ApmPlanInfo, error)

ListPlanHistory returns the historic plan list

func NewApmBody

func NewApmBody(params NewApmBodyParams) *models.CreateApmRequest

NewApmBody constructs a apm body for simple cases, abstracting the structure's complexity away from the user.

func ReapplyLatestPlanAttempt

func ReapplyLatestPlanAttempt(params PlanParams, reparams planutil.ReapplyParams) (*models.ApmCrudResponse, error)

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

func Restart

func Restart(params RestartParams) error

Restart an Apm cluster. There's two possible scenarios: * Cluster is running: re-applies the existing plan. * Cluster is stopped: starts it up with the most recent successful plan.

func Resync

func Resync(params ResyncParams) error

Resync forces indexer to immediately resynchronize the search index and cache for a given APM cluster.

func Show

func Show(params ShowParams) (*models.ApmInfo, error)

Show returns a deployment with the specified settings

func Shutdown

func Shutdown(params ShutdownParams) error

Shutdown stops a running APM.

func Upgrade

func Upgrade(params UpgradeParams) (*models.ClusterUpgradeInfo, error)

Upgrade bumps the APM instance to match the Elasticsearch deployment one.

Types

type DeleteParams

type DeleteParams struct {
	*api.API
	ID string
}

DeleteParams are the parameters needed to use Delete.

func (DeleteParams) Validate

func (params DeleteParams) Validate() error

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

type ListParams

type ListParams struct {
	*api.API

	// Optional parameters
	deputil.QueryParams
}

ListParams is used by the List apm function

func (ListParams) Validate

func (params ListParams) Validate() error

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

type NewApmBodyParams

type NewApmBodyParams struct {
	ID            string
	Name          string
	ZoneCount     int32
	MemoryPerNode int32
}

NewApmBodyParams is used by NewApmBody.

func (*NewApmBodyParams) Fill

func (params *NewApmBodyParams) Fill()

Fill sets any unset values to its default ones.

type PlanParams

type PlanParams struct {
	*api.API
	// ID represents the deployment ID.
	ID           string
	PlanDefaults bool
	util.TrackParams
}

PlanParams is used by the Plan command.

func (PlanParams) Validate

func (params PlanParams) Validate() error

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

type RestartParams

type RestartParams struct {
	*api.API
	ID string

	// Force cancels any pending plans that might be in progress.
	Force bool
	util.TrackParams
}

RestartParams is used by Restart.

func (RestartParams) Validate

func (params RestartParams) Validate() error

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

type ResyncParams

type ResyncParams struct {
	// API embeds API clients.
	*api.API

	// ClusterID contains an APM cluster ID.
	ClusterID string
}

ResyncParams represents parameters used to resynchronize an APM cluster.

func (ResyncParams) Validate

func (params ResyncParams) Validate() error

Validate ensures that the parameters such as APM cluster ID and the API client object are valid before the API call is made.

type ShowParams

type ShowParams struct {
	*api.API
	ID string

	// Optional parameters
	deputil.QueryParams
}

ShowParams is used by the Show apm function

func (ShowParams) Validate

func (params ShowParams) Validate() error

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

type ShutdownParams

type ShutdownParams struct {
	*api.API
	ID string

	// Stops the cluster and hides it from the user.
	Hide bool

	util.TrackParams
}

ShutdownParams are the parameters needed to use Shutdown.

func (ShutdownParams) Validate

func (params ShutdownParams) Validate() error

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

type UpgradeParams

type UpgradeParams struct {
	*api.API
	ID string

	util.TrackParams
}

UpgradeParams are the parameters needed to use Upgrade.

func (UpgradeParams) Validate

func (params UpgradeParams) 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