awsec2asg

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Type scaler.Type = "aws_ec2_asg"
)

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(k *koanf.Koanf) (scaler.Interface, error)

Types

type ASGTag

type ASGTag struct {
	Key               *string `koanf:"key"`
	Value             *string `koanf:"value"`
	PropagateAtLaunch *bool   `koanf:"propagate_at_launch"`
}

type InstanceDistribution

type InstanceDistribution struct {
	OnDemandAllocationStrategy       *string `koanf:"on_demand_allocation_strategy"`
	OnDemandBaseCapacity             *int64  `koanf:"on_demand_base_capacity"`
	OnDemandPercentAboveBaseCapacity *int64  `koanf:"on_demand_percentage_above_base_capacity"`
	SpotAllocationStrategy           *string `koanf:"spot_allocation_strategy"`
	SpotInstancePools                *int64  `koanf:"spot_instance_pools"`
	SpotMaxPrice                     *string `koanf:"spot_max_price"`
}

type LaunchTemplate

type LaunchTemplate struct {
	LaunchTemplateSpecification *LaunchTemplateSpecification `koanf:"launch_template_specification"`
	Overrides                   []*LaunchTemplateOverrides   `koanf:"overrides"`
}

type LaunchTemplateOverrides

type LaunchTemplateOverrides struct {
	InstanceType                *string                      `koanf:"instance_type" json:"instance_type"`
	LaunchTemplateSpecification *LaunchTemplateSpecification `koanf:"launch_template_specification" json:"launch_template_specification"`
	WeightedCapacity            *string                      `koanf:"weighted_capacity" json:"weighted_capacity"`
}

type LaunchTemplateSpecification

type LaunchTemplateSpecification struct {
	LaunchTemplateId   *string `koanf:"launch_template_id" json:"launch_template_id"`
	LaunchTemplateName *string `koanf:"launch_template_name" json:"launch_template_name"`
	Version            *string `koanf:"version" json:"version"`
}

type MixedInstancesPolicy

type MixedInstancesPolicy struct {
	InstanceDistribution *InstanceDistribution `koanf:"instances_distribution"`

	LaunchTemplate *LaunchTemplate `koanf:"launch_template"`
}

type Scaler

type Scaler struct {
	ID string `koanf:"id"`

	Region               *string               `koanf:"region"`
	AllowCreate          bool                  `koanf:"allow_create"`
	DisableScaleIn       *bool                 `koanf:"disable_scale_in"`
	DisableScaleOut      *bool                 `koanf:"disable_scale_out"`
	MinSize              *int64                `koanf:"min_size"`
	MaxSize              *int64                `koanf:"max_size"`
	CapacityRebalance    *bool                 `koanf:"capacity_rebalance"`
	DefaultCooldown      *int64                `koanf:"default_cooldown"`
	VpcZoneIdentifier    []string              `koanf:"vpc_zone_identifier"`
	PlacementGroup       *string               `koanf:"placement_group"`
	Tags                 []ASGTag              `koanf:"tags"`
	MixedInstancesPolicy *MixedInstancesPolicy `koanf:"mixed_instances_policy"`
	// contains filtered or unexported fields
}

func (*Scaler) Register

func (s *Scaler) Register(ctx context.Context) error

func (*Scaler) Type

func (s *Scaler) Type() scaler.Type

Jump to

Keyboard shortcuts

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