deployment

package
v1.0.0-beta3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

Create performs a Create using the specified Request against the API. Also overrides the passed request with the PayloadOverrides set in the wrapping CreateParams.

func Delete

Delete removes the specified deployment ID from the platform.

func Get

Get returns info about a deployment.

func GetApm

func GetApm(params GetParams) (*models.ApmResourceInfo, error)

GetApm returns info about an apm resource belonging to a given deployment.

func GetAppSearch

func GetAppSearch(params GetParams) (*models.AppSearchResourceInfo, error)

GetAppSearch returns info about an appsearch resource belonging to a given deployment.

func GetElasticsearch

func GetElasticsearch(params GetParams) (*models.ElasticsearchResourceInfo, error)

GetElasticsearch returns info about an elasticsearch resource belonging to a given deployment.

func GetElasticsearchID

func GetElasticsearchID(params GetParams) (string, error)

GetElasticsearchID returns the deployment's elasticsearch resource ID

func GetKibana

func GetKibana(params GetParams) (*models.KibanaResourceInfo, error)

GetKibana returns info about an kibana resource belonging to a given deployment.

func GetKindRefID

func GetKindRefID(params GetResourceParams) (string, error)

GetKindRefID obtains a resource kind RefID. If the kind is not supported an error is returned.

func GetResource

func GetResource(params GetResourceParams) (interface{}, error)

GetResource is a high level function which either returns the top level deployment information when no params.Kind is specified, or it returns a specific deployment resource information by RefID. If no RefID is defined, It will perform an additional API call to obtain the top level

func List

List returns the platform deployments

func Restore

Restore restores a deployment which has been previously shut down.

func Resync

func Resync(params ResyncParams) error

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

func ResyncAll

ResyncAll asynchronously resynchronizes the search index for all deployments.

Search performs a search using the specified Request against the API.

func Shutdown

Shutdown shuts down a deployment and all of its associated resources. To shutdown individual deployment resources use the kind specific APIs.

func Update

Update receives an update payload with an optional region override in case the region isn't specified in the update request payload. Additionally if Request.PruneOrphans is false then any omitted resources aren't shutdown. The opposite behavior can be expected when the flag is true since the update request is treated as the single source of truth and the complete desired deployment definition.

Types

type CreateParams

type CreateParams struct {
	*api.API

	Request *models.DeploymentCreateRequest

	RequestID string

	// deployment Overrides
	Overrides *PayloadOverrides
}

CreateParams is consumed by Create.

func (CreateParams) Validate

func (params CreateParams) Validate() error

Validate ensures the parameters are usable by Create.

type DeleteParams

type DeleteParams struct {
	*api.API
	DeploymentID string
}

DeleteParams is consumed by Delete.

func (DeleteParams) Validate

func (params DeleteParams) Validate() error

Validate ensures the parameters are usable by Delete.

type GetParams

type GetParams struct {
	*api.API
	DeploymentID string

	// Optional parameters
	deputil.QueryParams

	// RefID, when specified, skips auto-discovering the deployment resource
	// RefID and instead uses the one that's passed.
	RefID string
}

GetParams is consumed by get resource functions

func (GetParams) Validate

func (params GetParams) Validate() error

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

type GetResourceParams

type GetResourceParams struct {
	GetParams

	Kind string
}

GetResourceParams is consumed by GetResource.

type ListParams

type ListParams struct {
	*api.API
}

ListParams is consumed by List.

func (ListParams) Validate

func (params ListParams) Validate() error

Validate ensures the parameters are usable.

type Params

type Params struct {
	*api.API
	ID string
}

Params represents the generic parameters for any Deployment call

func (*Params) Validate

func (params *Params) Validate() error

Validate ensures that the parameters are usable

type PayloadOverrides

type PayloadOverrides struct {
	// If set, it will override the deployment name.
	Name string

	// If set, it will override the region when not present in the
	// DeploymentCreateRequest.
	// Note this behaviour is different from the rest of overrides
	// since this field tends to be populated by the global region
	// field which is implicit (by config) rather than explicit by flag.
	Region string

	// If set, it'll override all versions to match this one.
	Version string
}

PayloadOverrides represent the override settings to

type ResourceParams

type ResourceParams struct {
	*api.API

	DeploymentID string
	Kind         string
	RefID        string
}

ResourceParams can be embedded in any structure which makes use of the deployment/resource API which always require the fields. Also provides RefID auto-discovery for the deployment resource kind if not specified.

func (*ResourceParams) Validate

func (params *ResourceParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type RestoreParams

type RestoreParams struct {
	*api.API
	DeploymentID string

	RestoreSnapshot bool
}

RestoreParams is consumed by Restore.

func (RestoreParams) Validate

func (params RestoreParams) Validate() error

Validate ensures the parameters are usable by Restore.

type ResyncAllParams

type ResyncAllParams struct {
	*api.API
}

ResyncAllParams is consumed by ResyncAll

func (ResyncAllParams) Validate

func (params ResyncAllParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type ResyncParams

type ResyncParams struct {
	*api.API
	ID string
}

ResyncParams is consumed by Resync

func (ResyncParams) Validate

func (params ResyncParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type SearchParams

type SearchParams struct {
	*api.API

	Request *models.SearchRequest
}

SearchParams is consumed by Search.

func (SearchParams) Validate

func (params SearchParams) Validate() error

Validate ensures the parameters are usable by Shutdown.

type ShutdownParams

type ShutdownParams struct {
	*api.API
	DeploymentID string

	SkipSnapshot bool
}

ShutdownParams is consumed by Shutdown.

func (ShutdownParams) Validate

func (params ShutdownParams) Validate() error

Validate ensures the parameters are usable by Shutdown.

type UpdateParams

type UpdateParams struct {
	*api.API

	DeploymentID string
	Request      *models.DeploymentUpdateRequest

	// Optional values
	SkipSnapshot      bool
	HidePrunedOrphans bool

	// Region is an optional value which if set and the the Request.Resources
	// are missing a region, it populates that field with the value of Region.
	Region string
}

UpdateParams is consumed by Update.

func (UpdateParams) Validate

func (params UpdateParams) Validate() error

Validate ensures the parameters are usable by Update.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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