Documentation ¶
Index ¶
- Constants
- func CreateInstances(topologyName string, spec Ec2TopologySpec) ([]*ec2.Instance, error)
- func DeleteInstances(region string, instanceIds []string) error
- func GetInstanceIdsByTagKeyValue(region string, tagKey string, tagValue string) ([]string, error)
- func GetInstanceIdsByTopology(region string, topologyName string) ([]string, error)
- type Ec2Topology
- type Ec2TopologySpec
- type TopologyHandler
- func (t *TopologyHandler) Generate() (framework.Topology, error)
- func (t *TopologyHandler) Install(topology framework.Topology) (framework.DeploymentOutput, error)
- func (t *TopologyHandler) Parse(yamlContent []byte) (framework.Topology, error)
- func (t *TopologyHandler) Resolve(topology framework.Topology, data framework.TemplateData) (framework.Topology, error)
- func (t *TopologyHandler) Uninstall(topology framework.Topology) (framework.DeploymentOutput, error)
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 ¶
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) Install ¶
func (t *TopologyHandler) Install(topology framework.Topology) (framework.DeploymentOutput, error)
func (*TopologyHandler) Parse ¶
func (t *TopologyHandler) Parse(yamlContent []byte) (framework.Topology, error)
func (*TopologyHandler) Resolve ¶
func (t *TopologyHandler) Resolve(topology framework.Topology, data framework.TemplateData) (framework.Topology, error)
func (*TopologyHandler) Uninstall ¶
func (t *TopologyHandler) Uninstall(topology framework.Topology) (framework.DeploymentOutput, error)
Click to show internal directories.
Click to hide internal directories.