ec2

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindEc2Topology = "Ec2"

	DefaultVersion    = "datapunch.org/v1alpha1"
	DefaultRegion     = "us-west-1"
	DefaultNamePrefix = "my"
)
View Source
const MaxInstanceCount = 1000

Variables

This section is empty.

Functions

func CreateInstances

func CreateInstances(topologyName string, spec Ec2TopologySpec) ([]*ec2.Instance, error)

func DeleteInstances

func DeleteInstances(region string, instanceIds []string) error

func GetInstanceIdsByTagKeyValue

func GetInstanceIdsByTagKeyValue(region string, tagKey string, tagValue string) ([]string, error)

func GetInstanceIdsByTopology

func GetInstanceIdsByTopology(region string, topologyName string) ([]string, error)

Types

type Ec2Topology

type Ec2Topology struct {
	ApiVersion string                     `json:"apiVersion" yaml:"apiVersion"`
	Kind       string                     `json:"kind" yaml:"kind"`
	Metadata   framework.TopologyMetadata `json:"metadata"`
	Spec       Ec2TopologySpec            `json:"spec"`
}

func CreateDefaultEc2Topology

func CreateDefaultEc2Topology(namePrefix string) Ec2Topology

func (*Ec2Topology) GetKind

func (t *Ec2Topology) GetKind() string

func (*Ec2Topology) ToString

func (t *Ec2Topology) ToString() string

type Ec2TopologySpec

type Ec2TopologySpec struct {
	NamePrefix   string           `json:"namePrefix" yaml:"namePrefix"`
	Region       string           `json:"region" yaml:"region"`
	ImageId      string           `json:"imageId" yaml:"imageId"`
	InstanceType string           `json:"instanceType" yaml:"instanceType"`
	MinCount     int64            `json:"minCount" yaml:"minCount"`
	MaxCount     int64            `json:"maxCount" yaml:"maxCount"`
	InstanceRole resource.IAMRole `json:"instanceRole" yaml:"instanceRole"`
}

type TopologyHandler

type TopologyHandler struct {
}

func (*TopologyHandler) Generate

func (t *TopologyHandler) Generate() (framework.Topology, error)

func (*TopologyHandler) Install

func (*TopologyHandler) Parse

func (t *TopologyHandler) Parse(yamlContent []byte) (framework.Topology, error)

func (*TopologyHandler) Resolve

func (*TopologyHandler) Uninstall

Jump to

Keyboard shortcuts

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