biome

package
v0.0.0-...-e2f5efa Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: BSD-3-Clause Imports: 2 Imported by: 2

Documentation

Overview

Package biome messages used to perform commands, transiting over RabbitMQ. the testexecution service imports this package.

Index

Constants

View Source
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 AWSDetails struct {
	/*Auth*/
	AccessKeyID     string `json:"accessKeyID,omitempty"`
	SecretAccessKey string `json:"secretAccessKey,omitempty"`

	/*Instance Details*/
	Region      string `json:"region,omitempty"`
	NvmeStorage bool   `json:"nvmeStorage,omitempty"`
}

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 DiskMode

type DiskMode string

DiskMode is the mode in which to attach the disk

const (
	// ReadOnly means you can only read from the disk
	ReadOnly DiskMode = "READ_ONLY"
	// ReadWrite means you can both perform both read and write operations on the disk
	ReadWrite DiskMode = "READ_WRITE"
)

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

Jump to

Keyboard shortcuts

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