Documentation ¶
Index ¶
- type AccessConfig
- type Action
- type AliasIPRange
- type AutoScale
- func (o AutoScale) MarshalJSON() ([]byte, error)
- func (o *AutoScale) SetCooldown(v *int) *AutoScale
- func (o *AutoScale) SetDown(v *AutoScaleDown) *AutoScale
- func (o *AutoScale) SetHeadroom(v *AutoScaleHeadroom) *AutoScale
- func (o *AutoScale) SetIsAutoConfig(v *bool) *AutoScale
- func (o *AutoScale) SetIsEnabled(v *bool) *AutoScale
- type AutoScaleDown
- type AutoScaleGKE
- type AutoScaleHeadroom
- type AutoScaleLabel
- type BackendService
- func (o BackendService) MarshalJSON() ([]byte, error)
- func (o *BackendService) SetBackendServiceName(v *string) *BackendService
- func (o *BackendService) SetLocationType(v *string) *BackendService
- func (o *BackendService) SetNamedPorts(v *NamedPorts) *BackendService
- func (o *BackendService) SetScheme(v *string) *BackendService
- type BackendServiceConfig
- type Capacity
- type CapacityGKE
- type Compute
- func (o Compute) MarshalJSON() ([]byte, error)
- func (o *Compute) SetAvailabilityZones(v []string) *Compute
- func (o *Compute) SetGPU(v *GPU) *Compute
- func (o *Compute) SetHealth(v *Health) *Compute
- func (o *Compute) SetInstanceTypes(v *InstanceTypes) *Compute
- func (o *Compute) SetLaunchConfiguration(v *LaunchSpecification) *Compute
- func (o *Compute) SetSubnets(v []*Subnet) *Compute
- type CreateGroupInput
- type CreateGroupOutput
- type CustomInstance
- type DeleteGroupInput
- type DeleteGroupOutput
- type Dimension
- type Disk
- func (o Disk) MarshalJSON() ([]byte, error)
- func (o *Disk) SetAutoDelete(v *bool) *Disk
- func (o *Disk) SetBoot(v *bool) *Disk
- func (o *Disk) SetDeviceName(v *string) *Disk
- func (o *Disk) SetInitializeParams(v *InitializeParams) *Disk
- func (o *Disk) SetInterface(v *string) *Disk
- func (o *Disk) SetMode(v *string) *Disk
- func (o *Disk) SetSource(v *string) *Disk
- func (o *Disk) SetType(v *string) *Disk
- type DockerSwarmIntegration
- type GKEIntegration
- func (o GKEIntegration) MarshalJSON() ([]byte, error)
- func (o *GKEIntegration) SetAutoScale(v *AutoScaleGKE) *GKEIntegration
- func (o *GKEIntegration) SetAutoUpdate(v *bool) *GKEIntegration
- func (o *GKEIntegration) SetClusterID(v *string) *GKEIntegration
- func (o *GKEIntegration) SetLocation(v *string) *GKEIntegration
- type GPU
- type Group
- func (o Group) MarshalJSON() ([]byte, error)
- func (o *Group) SetCapacity(v *Capacity) *Group
- func (o *Group) SetCompute(v *Compute) *Group
- func (o *Group) SetDescription(v *string) *Group
- func (o *Group) SetID(v *string) *Group
- func (o *Group) SetIntegration(v *Integration) *Group
- func (o *Group) SetName(v *string) *Group
- func (o *Group) SetNodeImage(v *string) *Group
- func (o *Group) SetScaling(v *Scaling) *Group
- func (o *Group) SetScheduling(v *Scheduling) *Group
- func (o *Group) SetStrategy(v *Strategy) *Group
- type Health
- type ImportGKEClusterInput
- type ImportGKEClusterOutput
- type ImportGKEGroup
- func (o ImportGKEGroup) MarshalJSON() ([]byte, error)
- func (o *ImportGKEGroup) SetAvailabilityZones(v []string) *ImportGKEGroup
- func (o *ImportGKEGroup) SetCapacity(v *CapacityGKE) *ImportGKEGroup
- func (o *ImportGKEGroup) SetInstanceTypes(v *InstanceTypesGKE) *ImportGKEGroup
- func (o *ImportGKEGroup) SetName(v *string) *ImportGKEGroup
- func (o *ImportGKEGroup) SetNodeImage(v *string) *ImportGKEGroup
- func (o *ImportGKEGroup) SetPreemptiblePercentage(v *int) *ImportGKEGroup
- type InitializeParams
- type Instance
- type InstanceTypes
- type InstanceTypesGKE
- type Integration
- type Label
- type LaunchSpecification
- func (o LaunchSpecification) MarshalJSON() ([]byte, error)
- func (o *LaunchSpecification) SetBackendServiceConfig(v *BackendServiceConfig) *LaunchSpecification
- func (o *LaunchSpecification) SetDisks(v []*Disk) *LaunchSpecification
- func (o *LaunchSpecification) SetIPForwarding(v *bool) *LaunchSpecification
- func (o *LaunchSpecification) SetLabels(v []*Label) *LaunchSpecification
- func (o *LaunchSpecification) SetMetadata(v []*Metadata) *LaunchSpecification
- func (o *LaunchSpecification) SetNetworkInterfaces(v []*NetworkInterface) *LaunchSpecification
- func (o *LaunchSpecification) SetServiceAccount(v *string) *LaunchSpecification
- func (o *LaunchSpecification) SetShutdownScript(v *string) *LaunchSpecification
- func (o *LaunchSpecification) SetStartupScript(v *string) *LaunchSpecification
- func (o *LaunchSpecification) SetTags(v []string) *LaunchSpecification
- type ListGroupsInput
- type ListGroupsOutput
- type Metadata
- type NamedPorts
- type NetworkInterface
- func (o NetworkInterface) MarshalJSON() ([]byte, error)
- func (o *NetworkInterface) SetAccessConfigs(v []*AccessConfig) *NetworkInterface
- func (o *NetworkInterface) SetAliasIPRanges(v []*AliasIPRange) *NetworkInterface
- func (o *NetworkInterface) SetNetwork(v *string) *NetworkInterface
- func (o *NetworkInterface) SetProjectId(v *string) *NetworkInterface
- type ReadGroupInput
- type ReadGroupOutput
- type Scaling
- type ScalingPolicy
- func (o ScalingPolicy) MarshalJSON() ([]byte, error)
- func (o *ScalingPolicy) SetAction(v *Action) *ScalingPolicy
- func (o *ScalingPolicy) SetCooldown(v *int) *ScalingPolicy
- func (o *ScalingPolicy) SetDimensions(v []*Dimension) *ScalingPolicy
- func (o *ScalingPolicy) SetEvaluationPeriods(v *int) *ScalingPolicy
- func (o *ScalingPolicy) SetMetricName(v *string) *ScalingPolicy
- func (o *ScalingPolicy) SetNamespace(v *string) *ScalingPolicy
- func (o *ScalingPolicy) SetOperator(v *string) *ScalingPolicy
- func (o *ScalingPolicy) SetPeriod(v *int) *ScalingPolicy
- func (o *ScalingPolicy) SetPolicyName(v *string) *ScalingPolicy
- func (o *ScalingPolicy) SetSource(v *string) *ScalingPolicy
- func (o *ScalingPolicy) SetStatistic(v *string) *ScalingPolicy
- func (o *ScalingPolicy) SetThreshold(v *float64) *ScalingPolicy
- func (o *ScalingPolicy) SetUnit(v *string) *ScalingPolicy
- type Scheduling
- type Service
- type ServiceOp
- func (s *ServiceOp) Create(ctx context.Context, input *CreateGroupInput) (*CreateGroupOutput, error)
- func (s *ServiceOp) Delete(ctx context.Context, input *DeleteGroupInput) (*DeleteGroupOutput, error)
- func (s *ServiceOp) ImportGKECluster(ctx context.Context, input *ImportGKEClusterInput) (*ImportGKEClusterOutput, error)
- func (s *ServiceOp) List(ctx context.Context, input *ListGroupsInput) (*ListGroupsOutput, error)
- func (s *ServiceOp) Read(ctx context.Context, input *ReadGroupInput) (*ReadGroupOutput, error)
- func (s *ServiceOp) Status(ctx context.Context, input *StatusGroupInput) (*StatusGroupOutput, error)
- func (s *ServiceOp) Update(ctx context.Context, input *UpdateGroupInput) (*UpdateGroupOutput, error)
- type StatusGroupInput
- type StatusGroupOutput
- type Strategy
- type Subnet
- type Tag
- type Task
- func (o Task) MarshalJSON() ([]byte, error)
- func (o *Task) SetCronExpression(v *string) *Task
- func (o *Task) SetIsEnabled(v *bool) *Task
- func (o *Task) SetMaxCapacity(v *int) *Task
- func (o *Task) SetMinCapacity(v *int) *Task
- func (o *Task) SetTargetCapacity(v *int) *Task
- func (o *Task) SetType(v *string) *Task
- type UpdateGroupInput
- type UpdateGroupOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessConfig ¶
type AccessConfig struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` // contains filtered or unexported fields }
AccessConfig defines the access configuration for a network. AccessConfig is an element of NetworkInterface.
func (AccessConfig) MarshalJSON ¶
func (o AccessConfig) MarshalJSON() ([]byte, error)
func (*AccessConfig) SetName ¶
func (o *AccessConfig) SetName(v *string) *AccessConfig
SetName sets the name of the access configuration
func (*AccessConfig) SetType ¶
func (o *AccessConfig) SetType(v *string) *AccessConfig
SetType sets the type of access configuration
type Action ¶
type Action struct { Adjustment *int `json:"adjustment,omitempty"` Type *string `json:"type,omitempty"` // contains filtered or unexported fields }
Action defines the action attributes of a ScalingPolicy.
func (Action) MarshalJSON ¶
func (*Action) SetAdjustment ¶
SetAdjustment sets the number associated with the action type
type AliasIPRange ¶
type AliasIPRange struct { IPCIDRRange *string `json:"ipCidrRange,omitempty"` SubnetworkRangeName *string `json:"subnetworkRangeName,omitempty"` // contains filtered or unexported fields }
AliasIPRange defines the alias ip range for a network. AliasIPRange is an element of NetworkInterface.
func (AliasIPRange) MarshalJSON ¶
func (o AliasIPRange) MarshalJSON() ([]byte, error)
func (*AliasIPRange) SetIPCIDRRange ¶
func (o *AliasIPRange) SetIPCIDRRange(v *string) *AliasIPRange
SetIPCIDRRange sets the ip/cidr range
func (*AliasIPRange) SetSubnetworkRangeName ¶
func (o *AliasIPRange) SetSubnetworkRangeName(v *string) *AliasIPRange
SetSubnetworkRangeName sets the name of the subnetwork range
type AutoScale ¶
type AutoScale struct { IsEnabled *bool `json:"isEnabled,omitempty"` IsAutoConfig *bool `json:"isAutoConfig,omitempty"` Cooldown *int `json:"cooldown,omitempty"` Headroom *AutoScaleHeadroom `json:"headroom,omitempty"` Down *AutoScaleDown `json:"down,omitempty"` // contains filtered or unexported fields }
func (AutoScale) MarshalJSON ¶
func (*AutoScale) SetCooldown ¶
func (*AutoScale) SetDown ¶
func (o *AutoScale) SetDown(v *AutoScaleDown) *AutoScale
func (*AutoScale) SetHeadroom ¶
func (o *AutoScale) SetHeadroom(v *AutoScaleHeadroom) *AutoScale
func (*AutoScale) SetIsAutoConfig ¶
func (*AutoScale) SetIsEnabled ¶
type AutoScaleDown ¶
type AutoScaleDown struct { EvaluationPeriods *int `json:"evaluationPeriods,omitempty"` // contains filtered or unexported fields }
func (AutoScaleDown) MarshalJSON ¶
func (o AutoScaleDown) MarshalJSON() ([]byte, error)
func (*AutoScaleDown) SetEvaluationPeriods ¶
func (o *AutoScaleDown) SetEvaluationPeriods(v *int) *AutoScaleDown
type AutoScaleGKE ¶
type AutoScaleGKE struct { AutoScale // embedding Labels []*AutoScaleLabel `json:"labels,omitempty"` // contains filtered or unexported fields }
func (AutoScaleGKE) MarshalJSON ¶
func (o AutoScaleGKE) MarshalJSON() ([]byte, error)
func (*AutoScaleGKE) SetLabels ¶
func (o *AutoScaleGKE) SetLabels(v []*AutoScaleLabel) *AutoScaleGKE
SetLabels sets the AutoScale labels for the GKE integration
type AutoScaleHeadroom ¶
type AutoScaleHeadroom struct { CPUPerUnit *int `json:"cpuPerUnit,omitempty"` MemoryPerUnit *int `json:"memoryPerUnit,omitempty"` NumOfUnits *int `json:"numOfUnits,omitempty"` // contains filtered or unexported fields }
func (AutoScaleHeadroom) MarshalJSON ¶
func (o AutoScaleHeadroom) MarshalJSON() ([]byte, error)
func (*AutoScaleHeadroom) SetCPUPerUnit ¶
func (o *AutoScaleHeadroom) SetCPUPerUnit(v *int) *AutoScaleHeadroom
func (*AutoScaleHeadroom) SetMemoryPerUnit ¶
func (o *AutoScaleHeadroom) SetMemoryPerUnit(v *int) *AutoScaleHeadroom
func (*AutoScaleHeadroom) SetNumOfUnits ¶
func (o *AutoScaleHeadroom) SetNumOfUnits(v *int) *AutoScaleHeadroom
type AutoScaleLabel ¶
type AutoScaleLabel struct { Key *string `json:"key,omitempty"` Value *string `json:"value,omitempty"` // contains filtered or unexported fields }
func (AutoScaleLabel) MarshalJSON ¶
func (o AutoScaleLabel) MarshalJSON() ([]byte, error)
func (*AutoScaleLabel) SetKey ¶
func (o *AutoScaleLabel) SetKey(v *string) *AutoScaleLabel
func (*AutoScaleLabel) SetValue ¶
func (o *AutoScaleLabel) SetValue(v *string) *AutoScaleLabel
type BackendService ¶
type BackendService struct { BackendServiceName *string `json:"backendServiceName,omitempty"` LocationType *string `json:"locationType,omitempty"` Scheme *string `json:"scheme,omitempty"` NamedPorts *NamedPorts `json:"namedPorts,omitempty"` // contains filtered or unexported fields }
BackendService defines the configuration for a single backend service.
func (BackendService) MarshalJSON ¶
func (o BackendService) MarshalJSON() ([]byte, error)
func (*BackendService) SetBackendServiceName ¶
func (o *BackendService) SetBackendServiceName(v *string) *BackendService
SetBackendServiceName sets the name of the backend service.
func (*BackendService) SetLocationType ¶
func (o *BackendService) SetLocationType(v *string) *BackendService
SetLocationType sets the location type
func (*BackendService) SetNamedPorts ¶
func (o *BackendService) SetNamedPorts(v *NamedPorts) *BackendService
SetNamedPorts sets the named port object
func (*BackendService) SetScheme ¶
func (o *BackendService) SetScheme(v *string) *BackendService
SetScheme sets the scheme
type BackendServiceConfig ¶
type BackendServiceConfig struct { BackendServices []*BackendService `json:"backendServices,omitempty"` // contains filtered or unexported fields }
BackendServiceConfig constains a list of backend service configurations.
func (BackendServiceConfig) MarshalJSON ¶
func (o BackendServiceConfig) MarshalJSON() ([]byte, error)
func (*BackendServiceConfig) SetBackendServices ¶
func (o *BackendServiceConfig) SetBackendServices(v []*BackendService) *BackendServiceConfig
SetBackendServices sets the backend service list
type Capacity ¶
type Capacity struct { Maximum *int `json:"maximum,omitempty"` Minimum *int `json:"minimum,omitempty"` Target *int `json:"target,omitempty"` // contains filtered or unexported fields }
Capacity defines the capacity attributes of a Group instance
func (Capacity) MarshalJSON ¶
func (*Capacity) SetMaximum ¶
SetMaximum sets the Maximum number of VMs in the group.
func (*Capacity) SetMinimum ¶
SetMinimum sets the minimum number of VMs in the group
type CapacityGKE ¶
type CapacityGKE struct { Capacity //embedding // contains filtered or unexported fields }
type Compute ¶
type Compute struct { AvailabilityZones []string `json:"availabilityZones,omitempty"` GPU *GPU `json:"gpu,omitempty"` Health *Health `json:"health,omitempty"` InstanceTypes *InstanceTypes `json:"instanceTypes,omitempty"` LaunchSpecification *LaunchSpecification `json:"launchSpecification,omitempty"` Subnets []*Subnet `json:"subnets,omitempty"` // contains filtered or unexported fields }
Compute defines the compute attributes of a Group.
func (Compute) MarshalJSON ¶
func (*Compute) SetAvailabilityZones ¶
SetAvailabilityZones sets the list of availability zones for group resources.
func (*Compute) SetInstanceTypes ¶
func (o *Compute) SetInstanceTypes(v *InstanceTypes) *Compute
SetInstanceTypes sets the instance types for the group.
func (*Compute) SetLaunchConfiguration ¶
func (o *Compute) SetLaunchConfiguration(v *LaunchSpecification) *Compute
SetLaunchSpecification sets the launch configuration of the group.
func (*Compute) SetSubnets ¶
SetSubnets sets the subnets used by the group.
type CreateGroupInput ¶
type CreateGroupInput struct {
Group *Group `json:"group,omitempty"`
}
CreateGroupInput contains the Elastigroup description required when making a request to create an Elastigroup.
type CreateGroupOutput ¶
type CreateGroupOutput struct {
Group *Group `json:"group,omitempty"`
}
CreateGroupOutput contains a definition of the created Elastigroup, including the generated Group ID.
type CustomInstance ¶
type CustomInstance struct { VCPU *int `json:"vCPU,omitempty"` MemoryGiB *int `json:"memoryGiB,omitempty"` // contains filtered or unexported fields }
CustomInstance defines the memory and vCPU constraints of an instance
func (*CustomInstance) SetMemoryGiB ¶
func (o *CustomInstance) SetMemoryGiB(v *int) *CustomInstance
SetMemoryGiB sets the memory amount for a Custom Instance in intervals of 2, min 10
func (*CustomInstance) SetVCPU ¶
func (o *CustomInstance) SetVCPU(v *int) *CustomInstance
SetVCPU sets sets the number of vCPUs to use in a Custom instance type
type DeleteGroupInput ¶
type DeleteGroupInput struct {
GroupID *string `json:"groupId,omitempty"`
}
DeleteGroupInput contains the required input to delete an existing Elastigroup.
type DeleteGroupOutput ¶
type DeleteGroupOutput struct{}
DeleteGroupOutput describes the response a deleted group. Empty at this time.
type Dimension ¶
type Dimension struct { Name *string `json:"name,omitempty"` Value *string `json:"value,omitempty"` // contains filtered or unexported fields }
Dimension defines the attributes for the dimensions of a ScalingPolicy.
func (Dimension) MarshalJSON ¶
type Disk ¶
type Disk struct { AutoDelete *bool `json:"autoDelete,omitempty"` Boot *bool `json:"boot,omitempty"` DeviceName *string `json:"deviceName,omitempty"` InitializeParams *InitializeParams `json:"initializeParams,omitempty"` Interface *string `json:"interface,omitempty"` Mode *string `json:"mode,omitempty"` Source *string `json:"source,omitempty"` Type *string `json:"type,omitempty"` // contains filtered or unexported fields }
Disk defines the a block of memory resources for the group. Stored in an array of Disks, as defined in LaunchSpecification.
func (Disk) MarshalJSON ¶
func (*Disk) SetAutoDelete ¶
SetAutoDelete sets option to have disks autodelete
func (*Disk) SetDeviceName ¶
SetDeviceName sets the device name
func (*Disk) SetInitializeParams ¶
func (o *Disk) SetInitializeParams(v *InitializeParams) *Disk
SetInitializeParams sets the initialization paramters object
func (*Disk) SetInterface ¶
SetInterface sets the interface
type DockerSwarmIntegration ¶
type DockerSwarmIntegration struct { MasterHost *string `json:"masterHost,omitempty"` MasterPort *int `json:"masterPort,omitempty"` // contains filtered or unexported fields }
func (DockerSwarmIntegration) MarshalJSON ¶
func (o DockerSwarmIntegration) MarshalJSON() ([]byte, error)
func (*DockerSwarmIntegration) SetMasterHost ¶
func (o *DockerSwarmIntegration) SetMasterHost(v *string) *DockerSwarmIntegration
SetMasterHost sets the master host
func (*DockerSwarmIntegration) SetMasterPort ¶
func (o *DockerSwarmIntegration) SetMasterPort(v *int) *DockerSwarmIntegration
SetMasterPort sets the master port
type GKEIntegration ¶
type GKEIntegration struct { ClusterID *string `json:"clusterIdentifier,omitempty"` ClusterZoneName *string `json:"clusterZoneName,omitempty"` AutoUpdate *bool `json:"autoUpdate,omitempty"` AutoScale *AutoScaleGKE `json:"autoScale,omitempty"` Location *string `json:"location,omitempty"` // contains filtered or unexported fields }
func (GKEIntegration) MarshalJSON ¶
func (o GKEIntegration) MarshalJSON() ([]byte, error)
func (*GKEIntegration) SetAutoScale ¶
func (o *GKEIntegration) SetAutoScale(v *AutoScaleGKE) *GKEIntegration
SetAutoScale sets the AutoScale configuration used with the GKE integration
func (*GKEIntegration) SetAutoUpdate ¶
func (o *GKEIntegration) SetAutoUpdate(v *bool) *GKEIntegration
SetAutoUpdate sets the autoupdate flag
func (*GKEIntegration) SetClusterID ¶
func (o *GKEIntegration) SetClusterID(v *string) *GKEIntegration
SetClusterID sets the cluster ID
func (*GKEIntegration) SetLocation ¶
func (o *GKEIntegration) SetLocation(v *string) *GKEIntegration
SetLocation sets the location that the cluster is located in
type GPU ¶
type GPU struct { Type *string `json:"type,omitempty"` Count *int `json:"count,omitempty"` // contains filtered or unexported fields }
GPU defines the kind and number of GPUs to use with the group. GPU is an element of Compute.
func (GPU) MarshalJSON ¶
type Group ¶
type Group struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` NodeImage *string `json:"nodeImage,omitempty"` Capacity *Capacity `json:"capacity,omitempty"` Compute *Compute `json:"compute,omitempty"` Scaling *Scaling `json:"scaling,omitempty"` Scheduling *Scheduling `json:"scheduling,omitempty"` Strategy *Strategy `json:"strategy,omitempty"` Integration *Integration `json:"thirdPartiesIntegration,omitempty"` // Read-only fields. CreatedAt *time.Time `json:"createdAt,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` // contains filtered or unexported fields }
Group defines a GCP Elastigroup.
func (Group) MarshalJSON ¶
func (*Group) SetCapacity ¶
SetCapacity sets the Capacity object
func (*Group) SetCompute ¶
SetCompute sets the Compute object
func (*Group) SetDescription ¶
SetDescription sets the description for the group
func (*Group) SetIntegration ¶
func (o *Group) SetIntegration(v *Integration) *Group
SetIntegration sets the integrations for the group
func (*Group) SetNodeImage ¶
SetNodeImage sets image that will be used for the node VMs
func (*Group) SetScaling ¶
SetScaling sets the Scaling object
func (*Group) SetScheduling ¶
func (o *Group) SetScheduling(v *Scheduling) *Group
func (*Group) SetStrategy ¶
SetStrategy sets the Strategy object
type Health ¶
type Health struct { AutoHealing *bool `json:"autoHealing,omitempty"` GracePeriod *int `json:"gracePeriod,omitempty"` HealthCheckType *string `json:"healthCheckType,omitempty"` UnhealthyDuration *int `json:"unhealthyDuration,omitempty"` // contains filtered or unexported fields }
Health defines the healthcheck attributes for the group. Health is an element of Compute.
func (Health) MarshalJSON ¶
func (*Health) SetAutoHealing ¶
SetAutoHealing sets autohealing to true or false
func (*Health) SetGracePeriod ¶
SetGracePeriod sets the grace period time for the groups health check
func (*Health) SetHealthCheckType ¶
SetHealthCheckType sets the type of helath check to perform
func (*Health) SetUnhealthyDuration ¶
type ImportGKEClusterInput ¶
type ImportGKEClusterInput struct { ClusterID *string `json:"clusterID,omitempty"` ClusterZoneName *string `json:"clusterZoneName,omitempty"` DryRun *bool `json:"dryRun,omitempty"` Group *ImportGKEGroup `json:"group,omitempty"` }
ImportGKEClusterInput describes the input required when importing an existing GKE cluster into Elastigroup, if it exists.
type ImportGKEClusterOutput ¶
type ImportGKEClusterOutput struct {
Group *Group `json:"group,omitempty"`
}
ImportGKEClusterOutput contains a description of the Elastigroup and the imported GKE cluster.
type ImportGKEGroup ¶
type ImportGKEGroup struct { AvailabilityZones []string `json:"availabilityZones,omitempty"` Capacity *CapacityGKE `json:"capacity,omitempty"` Name *string `json:"name,omitempty"` InstanceTypes *InstanceTypesGKE `json:"instanceTypes,omitempty"` PreemptiblePercentage *int `json:"preemptiblePercentage,omitempty"` NodeImage *string `json:"nodeImage,omitempty"` // contains filtered or unexported fields }
ImportGKEGroup contains a modified group struct used for overriding cluster parameters on import
func (ImportGKEGroup) MarshalJSON ¶
func (o ImportGKEGroup) MarshalJSON() ([]byte, error)
func (*ImportGKEGroup) SetAvailabilityZones ¶
func (o *ImportGKEGroup) SetAvailabilityZones(v []string) *ImportGKEGroup
SetAvailabilityZones sets the availability zones for the gke group
func (*ImportGKEGroup) SetCapacity ¶
func (o *ImportGKEGroup) SetCapacity(v *CapacityGKE) *ImportGKEGroup
SetCapacity sets the capacity for a gke group
func (*ImportGKEGroup) SetInstanceTypes ¶
func (o *ImportGKEGroup) SetInstanceTypes(v *InstanceTypesGKE) *ImportGKEGroup
SetInstanceTypes sets the instance types for the group.
func (*ImportGKEGroup) SetName ¶
func (o *ImportGKEGroup) SetName(v *string) *ImportGKEGroup
SetName sets the group name
func (*ImportGKEGroup) SetNodeImage ¶
func (o *ImportGKEGroup) SetNodeImage(v *string) *ImportGKEGroup
SetNodeImage sets the node image for the imported gke group.
func (*ImportGKEGroup) SetPreemptiblePercentage ¶
func (o *ImportGKEGroup) SetPreemptiblePercentage(v *int) *ImportGKEGroup
SetPreemptiblePercentage sets the preemptible percentage when importing a gke cluster into Elastigroup.
type InitializeParams ¶
type InitializeParams struct { DiskSizeGB *int `json:"diskSizeGb,omitempty"` DiskType *string `json:"diskType,omitempty"` SourceImage *string `json:"sourceImage,omitempty"` // contains filtered or unexported fields }
InitializeParams defines the initialization parameters for a Disk object.
func (InitializeParams) MarshalJSON ¶
func (o InitializeParams) MarshalJSON() ([]byte, error)
func (*InitializeParams) SetDiskSizeGB ¶
func (o *InitializeParams) SetDiskSizeGB(v *int) *InitializeParams
SetDiskSizeGB sets the disk size in gigabytes, in multiples of 2
func (*InitializeParams) SetDiskType ¶
func (o *InitializeParams) SetDiskType(v *string) *InitializeParams
SetDiskType sets the type of disk
func (*InitializeParams) SetSourceImage ¶
func (o *InitializeParams) SetSourceImage(v *string) *InitializeParams
SetSourceImage sets the source image to use
type Instance ¶
type Instance struct { CreatedAt *time.Time `json:"createdAt,omitempty"` InstanceName *string `json:"instanceName,omitempty"` LifeCycle *string `json:"lifeCycle,omitempty"` MachineType *string `json:"machineType,omitempty"` PrivateIP *string `json:"privateIpAddress,omitempty"` PublicIP *string `json:"publicIpAddress,omitempty"` StatusName *string `json:"statusName,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` Zone *string `json:"zone,omitempty"` }
Instance describes an individual instance's status and is returned by a Status request
type InstanceTypes ¶
type InstanceTypes struct { OnDemand *string `json:"ondemand,omitempty"` Preemptible []string `json:"preemptible,omitempty"` Custom []*CustomInstance `json:"custom,omitempty"` // contains filtered or unexported fields }
InstanceTypes defines the type of instances to use with the group. InstanceTypes is an element of Compute.
func (InstanceTypes) MarshalJSON ¶
func (o InstanceTypes) MarshalJSON() ([]byte, error)
func (*InstanceTypes) SetCustom ¶
func (o *InstanceTypes) SetCustom(v []*CustomInstance) *InstanceTypes
SetCustom sets the memory and vCPU attributes for Custom Instance types
func (*InstanceTypes) SetOnDemand ¶
func (o *InstanceTypes) SetOnDemand(v *string) *InstanceTypes
SetOnDemand sets the kind of on demand instances to use for the group.
func (*InstanceTypes) SetPreemptible ¶
func (o *InstanceTypes) SetPreemptible(v []string) *InstanceTypes
SetPreemptible sets the kind of premeptible instances to use with the group.
type InstanceTypesGKE ¶
type InstanceTypesGKE struct { OnDemand *string `json:"ondemand,omitempty"` Preemptible []string `json:"preemptible,omitempty"` // contains filtered or unexported fields }
func (InstanceTypesGKE) MarshalJSON ¶
func (o InstanceTypesGKE) MarshalJSON() ([]byte, error)
func (*InstanceTypesGKE) SetOnDemand ¶
func (o *InstanceTypesGKE) SetOnDemand(v *string) *InstanceTypesGKE
SetOnDemand sets the instance types when importing a gke group
func (*InstanceTypesGKE) SetPreemptible ¶
func (o *InstanceTypesGKE) SetPreemptible(v []string) *InstanceTypesGKE
SetPreemptible sets the list of preemptible instance types
type Integration ¶
type Integration struct { GKE *GKEIntegration `json:"gke,omitempty"` DockerSwarm *DockerSwarmIntegration `json:"dockerSwarm,omitempty"` // contains filtered or unexported fields }
func (Integration) MarshalJSON ¶
func (o Integration) MarshalJSON() ([]byte, error)
func (*Integration) SetDockerSwarm ¶
func (o *Integration) SetDockerSwarm(v *DockerSwarmIntegration) *Integration
SetDockerSwarm sets the DockerSwarm integration
func (*Integration) SetGKE ¶
func (o *Integration) SetGKE(v *GKEIntegration) *Integration
SetGKEIntegration sets the GKE integration
type Label ¶
type Label struct { Key *string `json:"key,omitempty"` Value *string `json:"value,omitempty"` // contains filtered or unexported fields }
Label defines an object holding a key:value pair. Label is an element of LaunchSpecification.
func (Label) MarshalJSON ¶
type LaunchSpecification ¶
type LaunchSpecification struct { BackendServiceConfig *BackendServiceConfig `json:"backendServiceConfig,omitempty"` Disks []*Disk `json:"disks,omitempty"` Labels []*Label `json:"labels,omitempty"` IPForwarding *bool `json:"ipForwarding,omitempty"` NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` Metadata []*Metadata `json:"metadata,omitempty"` ServiceAccount *string `json:"serviceAccount,omitempty"` StartupScript *string `json:"startupScript,omitempty"` ShutdownScript *string `json:"shutdownScript,omitempty"` Tags []string `json:"tags,omitempty"` // contains filtered or unexported fields }
LaunchSpecification defines launch attributes for the Group. LaunchSpecification is an element of Compute.
func (LaunchSpecification) MarshalJSON ¶
func (o LaunchSpecification) MarshalJSON() ([]byte, error)
func (*LaunchSpecification) SetBackendServiceConfig ¶
func (o *LaunchSpecification) SetBackendServiceConfig(v *BackendServiceConfig) *LaunchSpecification
SetBackendServices sets the backend services to use with the group.
func (*LaunchSpecification) SetDisks ¶
func (o *LaunchSpecification) SetDisks(v []*Disk) *LaunchSpecification
SetDisks sets the list of disks used by the group
func (*LaunchSpecification) SetIPForwarding ¶
func (o *LaunchSpecification) SetIPForwarding(v *bool) *LaunchSpecification
SetIPForwarding sets whether to use IP forwarding for this group.
func (*LaunchSpecification) SetLabels ¶
func (o *LaunchSpecification) SetLabels(v []*Label) *LaunchSpecification
SetLabels sets the labels to be used with the group
func (*LaunchSpecification) SetMetadata ¶
func (o *LaunchSpecification) SetMetadata(v []*Metadata) *LaunchSpecification
SetMetadata sets metadata for the group.
func (*LaunchSpecification) SetNetworkInterfaces ¶
func (o *LaunchSpecification) SetNetworkInterfaces(v []*NetworkInterface) *LaunchSpecification
SetNetworkInterfaces sets number and kinds of network interfaces used by the group.
func (*LaunchSpecification) SetServiceAccount ¶
func (o *LaunchSpecification) SetServiceAccount(v *string) *LaunchSpecification
SetServiceAccount sets the service account used by the instances in the group
func (*LaunchSpecification) SetShutdownScript ¶
func (o *LaunchSpecification) SetShutdownScript(v *string) *LaunchSpecification
SetShutdownScript sets the script that will run when draining instances before termination
func (*LaunchSpecification) SetStartupScript ¶
func (o *LaunchSpecification) SetStartupScript(v *string) *LaunchSpecification
SetStartupScript sets the startup script to be executed when the instance launches.
func (*LaunchSpecification) SetTags ¶
func (o *LaunchSpecification) SetTags(v []string) *LaunchSpecification
SetTags sets the list of tags
type ListGroupsInput ¶
type ListGroupsInput struct{}
ListGroupsInput describes the input required when making a request to list all groups in an account.
type ListGroupsOutput ¶
type ListGroupsOutput struct {
Groups []*Group `json:"groups,omitempty"`
}
ListGroupsOutput contains an array of groups.
type Metadata ¶
type Metadata struct { Key *string `json:"key,omitempty"` Value *string `json:"value,omitempty"` // contains filtered or unexported fields }
Metadata defines an object holding a key:value pair. Metadata is an element of LaunchSpecification.
func (Metadata) MarshalJSON ¶
type NamedPorts ¶
type NamedPorts struct { Name *string `json:"name,omitempty"` Ports []int `json:"ports,omitempty"` // contains filtered or unexported fields }
NamedPorts describes the name and list of ports to use with the backend service
func (NamedPorts) MarshalJSON ¶
func (o NamedPorts) MarshalJSON() ([]byte, error)
func (*NamedPorts) SetName ¶
func (o *NamedPorts) SetName(v *string) *NamedPorts
SetNamedPorts sets the name of the NamedPorts
func (*NamedPorts) SetPorts ¶
func (o *NamedPorts) SetPorts(v []int) *NamedPorts
SetPorts sets the list of ports in the NamedPorts
type NetworkInterface ¶
type NetworkInterface struct { AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` AliasIPRanges []*AliasIPRange `json:"aliasIpRanges,omitempty"` Network *string `json:"network,omitempty"` ProjectID *string `json:"projectId,omitempty"` // contains filtered or unexported fields }
NetworkInterface defines the network configuration for a Group. NetworkInterface is an element of LaunchSpecification.
func (NetworkInterface) MarshalJSON ¶
func (o NetworkInterface) MarshalJSON() ([]byte, error)
func (*NetworkInterface) SetAccessConfigs ¶
func (o *NetworkInterface) SetAccessConfigs(v []*AccessConfig) *NetworkInterface
SetAccessConfigs creates a list of one or more access configuration objects
func (*NetworkInterface) SetAliasIPRanges ¶
func (o *NetworkInterface) SetAliasIPRanges(v []*AliasIPRange) *NetworkInterface
SetAliasIPRanges sets a list of alias IP range objects
func (*NetworkInterface) SetNetwork ¶
func (o *NetworkInterface) SetNetwork(v *string) *NetworkInterface
SetNetwork sets the name of the network
func (*NetworkInterface) SetProjectId ¶ added in v1.46.0
func (o *NetworkInterface) SetProjectId(v *string) *NetworkInterface
SetProjectId sets the project identifier of the network.
type ReadGroupInput ¶
type ReadGroupInput struct {
GroupID *string `json:"groupId,omitempty"`
}
ReadGroupInput describes the input required when making a request to list a single Elastigroup.
type ReadGroupOutput ¶
type ReadGroupOutput struct {
Group *Group `json:"group,omitempty"`
}
ReadGroupOutput contains a description of the requested Elastigroup, if it exists.
type Scaling ¶
type Scaling struct { Up []*ScalingPolicy `json:"up,omitempty"` Down []*ScalingPolicy `json:"down,omitempty"` // contains filtered or unexported fields }
Scaling defines the scaling attributes of a Group
func (Scaling) MarshalJSON ¶
func (*Scaling) SetDown ¶
func (o *Scaling) SetDown(v []*ScalingPolicy) *Scaling
SetDown sets the scaling policy to use when decreasing the number of instances in a group.
func (*Scaling) SetUp ¶
func (o *Scaling) SetUp(v []*ScalingPolicy) *Scaling
SetUp sets the scaling policy to usewhen increasing the number of instances in a group.
type ScalingPolicy ¶
type ScalingPolicy struct { Action *Action `json:"action,omitempty"` Cooldown *int `json:"cooldown,omitempty"` Dimensions []*Dimension `json:"dimensions,omitempty"` EvaluationPeriods *int `json:"evaluationPeriods,omitempty"` MetricName *string `json:"metricName,omitempty"` Namespace *string `json:"namespace,omitempty"` Operator *string `json:"operator,omitempty"` Period *int `json:"period,omitempty"` PolicyName *string `json:"policyName,omitempty"` Source *string `json:"source,omitempty"` Statistic *string `json:"statistic,omitempty"` Threshold *float64 `json:"threshold,omitempty"` Unit *string `json:"unit,omitempty"` // contains filtered or unexported fields }
ScalingPolicy defines the scaling attributes for both up and down policies. ScalingPolicy is an element of Scaling.
func (ScalingPolicy) MarshalJSON ¶
func (o ScalingPolicy) MarshalJSON() ([]byte, error)
func (*ScalingPolicy) SetAction ¶
func (o *ScalingPolicy) SetAction(v *Action) *ScalingPolicy
SetAction sets the action to perform when scaling
func (*ScalingPolicy) SetCooldown ¶
func (o *ScalingPolicy) SetCooldown(v *int) *ScalingPolicy
SetCooldown sets the cooldown time in seconds before triggered events can start
func (*ScalingPolicy) SetDimensions ¶
func (o *ScalingPolicy) SetDimensions(v []*Dimension) *ScalingPolicy
SetDimensions sets the list of dimension objects
func (*ScalingPolicy) SetEvaluationPeriods ¶
func (o *ScalingPolicy) SetEvaluationPeriods(v *int) *ScalingPolicy
SetEvaluationPeriods sets the number of periods over which data is compared
func (*ScalingPolicy) SetMetricName ¶
func (o *ScalingPolicy) SetMetricName(v *string) *ScalingPolicy
SetMetricName sets the name of the metric to compare
func (*ScalingPolicy) SetNamespace ¶
func (o *ScalingPolicy) SetNamespace(v *string) *ScalingPolicy
SetNamespace sets the namespace for the associated metric
func (*ScalingPolicy) SetOperator ¶
func (o *ScalingPolicy) SetOperator(v *string) *ScalingPolicy
SetOperator sets the operator (gte, lte)
func (*ScalingPolicy) SetPeriod ¶
func (o *ScalingPolicy) SetPeriod(v *int) *ScalingPolicy
SetPeriod sets the period in seconds over which the statistic is applied
func (*ScalingPolicy) SetPolicyName ¶
func (o *ScalingPolicy) SetPolicyName(v *string) *ScalingPolicy
SetPolicyName sets the name of the scaling policy
func (*ScalingPolicy) SetSource ¶
func (o *ScalingPolicy) SetSource(v *string) *ScalingPolicy
SetSource sets the source of the metric (spectrum, stackdriver)
func (*ScalingPolicy) SetStatistic ¶
func (o *ScalingPolicy) SetStatistic(v *string) *ScalingPolicy
SetStatistic sets the metric aggregator to return (average, sum, min, max)
func (*ScalingPolicy) SetThreshold ¶
func (o *ScalingPolicy) SetThreshold(v *float64) *ScalingPolicy
SetThreshold sets the value against which the metric is compared
func (*ScalingPolicy) SetUnit ¶
func (o *ScalingPolicy) SetUnit(v *string) *ScalingPolicy
SetUnit sets the unit for the associated metric
type Scheduling ¶
type Scheduling struct { Tasks []*Task `json:"tasks,omitempty"` // contains filtered or unexported fields }
func (Scheduling) MarshalJSON ¶
func (o Scheduling) MarshalJSON() ([]byte, error)
func (*Scheduling) SetTasks ¶
func (o *Scheduling) SetTasks(v []*Task) *Scheduling
type Service ¶
type Service interface { Create(context.Context, *CreateGroupInput) (*CreateGroupOutput, error) Read(context.Context, *ReadGroupInput) (*ReadGroupOutput, error) Update(context.Context, *UpdateGroupInput) (*UpdateGroupOutput, error) Delete(context.Context, *DeleteGroupInput) (*DeleteGroupOutput, error) List(context.Context, *ListGroupsInput) (*ListGroupsOutput, error) ImportGKECluster(context.Context, *ImportGKEClusterInput) (*ImportGKEClusterOutput, error) Status(context.Context, *StatusGroupInput) (*StatusGroupOutput, error) }
Service provides the API operation methods for making requests to endpoints of the Spotinst API. See this package's package overview docs for details on the service.
type ServiceOp ¶
func (*ServiceOp) Create ¶
func (s *ServiceOp) Create(ctx context.Context, input *CreateGroupInput) (*CreateGroupOutput, error)
Create creates a new Elastigroup using GCE resources.
func (*ServiceOp) Delete ¶
func (s *ServiceOp) Delete(ctx context.Context, input *DeleteGroupInput) (*DeleteGroupOutput, error)
Delete removes a single existing Elastigroup and destroys all associated GCE resources.
func (*ServiceOp) ImportGKECluster ¶
func (s *ServiceOp) ImportGKECluster(ctx context.Context, input *ImportGKEClusterInput) (*ImportGKEClusterOutput, error)
ImportGKECluster imports an existing GKE cluster into Elastigroup.
func (*ServiceOp) List ¶
func (s *ServiceOp) List(ctx context.Context, input *ListGroupsInput) (*ListGroupsOutput, error)
List returns the configuration of all existing Elastigroups in a given Spotinst GCE account.
func (*ServiceOp) Read ¶
func (s *ServiceOp) Read(ctx context.Context, input *ReadGroupInput) (*ReadGroupOutput, error)
Read returns the configuration of a single existing Elastigroup.
func (*ServiceOp) Status ¶
func (s *ServiceOp) Status(ctx context.Context, input *StatusGroupInput) (*StatusGroupOutput, error)
Status describes the current status of the instances in a specific Elastigroup
func (*ServiceOp) Update ¶
func (s *ServiceOp) Update(ctx context.Context, input *UpdateGroupInput) (*UpdateGroupOutput, error)
Update modifies the configuration of a single existing Elastigroup.
type StatusGroupInput ¶
type StatusGroupInput struct {
GroupID *string `json:"groupId,omitempty"`
}
StatusGroupInput describes the required input when making a request to see an Elastigroup's status.
type StatusGroupOutput ¶
type StatusGroupOutput struct {
Instances []*Instance `json:"instances,omitempty"`
}
StatusGroupOutput describes the status of the instances in the Elastigroup.
type Strategy ¶
type Strategy struct { DrainingTimeout *int `json:"drainingTimeout,omitempty"` FallbackToOnDemand *bool `json:"fallbackToOd,omitempty"` PreemptiblePercentage *int `json:"preemptiblePercentage,omitempty"` OnDemandCount *int `json:"onDemandCount,omitempty"` // contains filtered or unexported fields }
Strategy defines the strategy attributes of a Group.
func (Strategy) MarshalJSON ¶
func (*Strategy) SetDrainingTimeout ¶
SetDrainingTimeout sets the time to keep an instance alive after detaching it from the group
func (*Strategy) SetFallbackToOnDemand ¶
SetFallbackToOnDemand sets the option to fallback to on demand instances if preemptible instances arent available
func (*Strategy) SetOnDemandCount ¶
SetOnDemandCount sets the number of on demand instances to use in the group.
func (*Strategy) SetPreemptiblePercentage ¶
SetPreemptiblePercentage sets the ratio of preemptible instances to use in the group
type Subnet ¶
type Subnet struct { Region *string `json:"region,omitempty"` SubnetNames []string `json:"subnetNames,omitempty"` // contains filtered or unexported fields }
Subnet defines the attributes of a single Subnet. The Subnets list is an element of Compute.
func (Subnet) MarshalJSON ¶
func (*Subnet) SetSubnetNames ¶
SetSubnetNames sets the list of subnets names to use
type Tag ¶
type Tag struct { Key *string `json:"tagKey,omitempty"` Value *string `json:"tagValue,omitempty"` // contains filtered or unexported fields }
func (Tag) MarshalJSON ¶
type Task ¶
type Task struct { IsEnabled *bool `json:"isEnabled,omitempty"` Type *string `json:"taskType,omitempty"` CronExpression *string `json:"cronExpression,omitempty"` TargetCapacity *int `json:"targetCapacity,omitempty"` MinCapacity *int `json:"minCapacity,omitempty"` MaxCapacity *int `json:"maxCapacity,omitempty"` // contains filtered or unexported fields }
func (Task) MarshalJSON ¶
func (*Task) SetCronExpression ¶
func (*Task) SetIsEnabled ¶
func (*Task) SetMaxCapacity ¶
func (*Task) SetMinCapacity ¶
func (*Task) SetTargetCapacity ¶
type UpdateGroupInput ¶
type UpdateGroupInput struct {
Group *Group `json:"group,omitempty"`
}
UpdateGroupInput contains a description of one or more valid attributes that will be applied to an existing Elastigroup.
type UpdateGroupOutput ¶
type UpdateGroupOutput struct {
Group *Group `json:"group,omitempty"`
}
UpdateGroupOutPut contains a description of the updated Elastigroup, if successful.