Documentation
¶
Overview ¶
Package biome messages used to perform commands, transiting over RabbitMQ. the testexecution service imports this package.
Index ¶
Constants ¶
const ( // GCPProvider represents the Google Cloud Platform Provider GCPProvider = CloudProvider("gcp") // AWSProvider represents the AWS Platform provider AWSProvider = CloudProvider("aws") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSDetails ¶
type CloudAccess ¶
type CloudAccess struct {
Provider CloudProvider `json:"provider,omitempty"`
Details interface{} `json:"details,omitempty"`
}
func (CloudAccess) AWS ¶
func (ca CloudAccess) AWS() AWSDetails
AWS provides an easy way to fetch details as AWS details
func (CloudAccess) GCP ¶
func (ca CloudAccess) GCP() GCPDetails
GCP provides an easy way to fetch details as GCP details
func (CloudAccess) IsAWS ¶
func (ca CloudAccess) IsAWS() bool
IsAWS returns whether this is access for AWS
func (CloudAccess) IsGCP ¶
func (ca CloudAccess) IsGCP() bool
IsGCP returns whether this is access for GCP
func (CloudAccess) IsProvided ¶
func (ca CloudAccess) IsProvided() bool
func (*CloudAccess) UnmarshalJSON ¶
func (ca *CloudAccess) UnmarshalJSON(data []byte) error
type CloudProvider ¶
type CloudProvider string
CloudProvider is the remote cloud provide to provision the instance on
type CreateBiome ¶
type CreateBiome struct {
DefinitionID string `json:"definitionID"`
TestID string `json:"testID"`
OrgID string `json:"orgID"`
Instances []Instance `json:"nodes"`
Metrics settings.Metrics `json:"metrics"`
Auth CloudAccess `json:"auth,omitempty"`
}
CreateBiome represents the create biome command
type DestroyBiome ¶
type DestroyBiome struct {
DefinitionID string `json:"definitionID"`
TestID string `json:"testID"`
Auth CloudAccess `json:"auth,omitempty"`
}
DestroyBiome represents the destroy biome command
type GCPDetails ¶
type GCPDetails struct {
/*Auth*/
AuthToken string `json:"authToken,omitempty"`
/*Instance Details*/
Zone string `json:"zone,omitempty"`
Project string `json:"project,omitempty"`
SourceImage string `json:"sourceImage,omitempty"`
Network string `json:"network,omitempty"`
SubNetwork string `json:"subNetwork,omitempty"`
}
GCPDetails contains the details to connect and deploy on foreign infrastructure
type Instance ¶
type Instance struct {
Provider CloudProvider `json:"provider,omitempty"`
CPUs int64 `json:"cpus"`
Memory int64 `json:"memory"` //MB
Storage int64 `json:"storage"` //MB
Domain string `json:"domain,omitempty"`
SourceDisks []SourceDisk `json:"sourceDisks,omitempty"`
SetupCommands [][]string `json:"setupCommands"`
Labels map[string]string `json:"labels"`
}
Instance defines the size of each instance to create
type SourceDisk ¶
type SourceDisk struct {
Source string `json:"source"`
Mode DiskMode `json:"mode"`
// Consumers gives the names of the containers who will use this data.
// They will receive their own independent copy of the data.
Consumers []string `json:"consumers,omitempty"`
}
SourceDisk represents an additional disk to attach to the instance, in order to provide data