This is the multi-page printable view of this section. Click here to print.
Providers
1 - aws
Package aws handles communications with AWS APIs
import "github.com/analog-substance/carbon/pkg/providers/aws"
Package aws handles communications with AWS APIs
Index
- func New() types.Provider
- type Environment
- func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
- func (e *Environment) DestroyImage(imageID string) error
- func (e *Environment) DestroyVM(id string) error
- func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
- func (e *Environment) Images() ([]types.Image, error)
- func (e *Environment) Name() string
- func (e *Environment) Profile() types.Profile
- func (e *Environment) RestartVM(id string) error
- func (e *Environment) StartVM(id string) error
- func (e *Environment) StopVM(id string) error
- func (e *Environment) VMs() []types.VM
- type Profile
- type Provider
func New
func New() types.Provider
New creates new instance of an AWS Provider and returns it. Defaults to no awsProfileNames, this forces a query of the AWS config at runtime.
type Environment
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) CreateVM
func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
func (*Environment) DestroyImage
func (e *Environment) DestroyImage(imageID string) error
func (*Environment) DestroyVM
func (e *Environment) DestroyVM(id string) error
func (*Environment) ImageBuilds
func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
func (*Environment) Images
func (e *Environment) Images() ([]types.Image, error)
func (*Environment) Name
func (e *Environment) Name() string
func (*Environment) Profile
func (e *Environment) Profile() types.Profile
func (*Environment) RestartVM
func (e *Environment) RestartVM(id string) error
func (*Environment) StartVM
func (e *Environment) StartVM(id string) error
func (*Environment) StopVM
func (e *Environment) StopVM(id string) error
func (*Environment) VMs
func (e *Environment) VMs() []types.VM
type Profile
type Profile struct {
types.Profile
}
func NewProfile
func NewProfile(name string, providerInstance *Provider, config common.ProfileConfig) *Profile
func (*Profile) Environments
func (p *Profile) Environments() []types.Environment
type Provider
type Provider struct {
types.Provider
// contains filtered or unexported fields
}
func (*Provider) AWSProfiles
func (p *Provider) AWSProfiles() []string
func (*Provider) IsAvailable
func (p *Provider) IsAvailable() bool
func (*Provider) Profiles
func (p *Provider) Profiles() []types.Profile
2 - base
import "github.com/analog-substance/carbon/pkg/providers/base"
Index
- Constants
- func DestroyImageForFileBasedProvider(imageID string) error
- func GetImagesForFileBasedProvider(providerType string, e types.Environment) ([]types.Image, error)
- func New() types.Provider
- func NewProfile(name string, providerInstance types.Provider, config common.ProfileConfig) types.Profile
- func NewWithName(name string) types.Provider
- type Environment
- func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
- func (e *Environment) DestroyImage(imageID string) error
- func (e *Environment) DestroyVM(id string) error
- func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
- func (e *Environment) Images() ([]types.Image, error)
- func (e *Environment) Name() string
- func (e *Environment) Profile() types.Profile
- func (e *Environment) RestartVM(id string) error
- func (e *Environment) StartVM(id string) error
- func (e *Environment) StopVM(id string) error
- func (e *Environment) VMs() []types.VM
- type ImageBuildDate
- type Profile
- type Provider
- func (p *Provider) GetConfig() common.ProviderConfig
- func (p *Provider) IsAvailable() bool
- func (p *Provider) Name() string
- func (p *Provider) NewImageBuild(name, tplDir string) (types.ImageBuild, error)
- func (p *Provider) NewProject(name string, force bool) (types.Project, error)
- func (p *Provider) Profiles() []types.Profile
- func (p *Provider) SetConfig(config common.ProviderConfig)
- func (p *Provider) Type() string
Constants
const CloudInitDir = "cloud-init"
const ISOVarUsage = "var.iso_url"
const PackerFileIsoVars = "iso-variables.pkr.hcl"
const PackerFileLocalVars = "local-variables.pkr.hcl"
const PackerFilePacker = "packer.pkr.hcl"
const PackerFilePrivateVarsExample = "private.auto.pkrvars.hcl.example"
const PackerFileSuffixAnsible = "-ansible.pkr.hcl"
const PackerFileSuffixCloudInit = "-cloud-init.pkr.hcl"
const PackerFileSuffixVariables = "-variables.pkr.hcl"
func DestroyImageForFileBasedProvider
func DestroyImageForFileBasedProvider(imageID string) error
func GetImagesForFileBasedProvider
func GetImagesForFileBasedProvider(providerType string, e types.Environment) ([]types.Image, error)
func New
func New() types.Provider
func NewProfile
func NewProfile(name string, providerInstance types.Provider, config common.ProfileConfig) types.Profile
func NewWithName
func NewWithName(name string) types.Provider
type Environment
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) CreateVM
func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
func (*Environment) DestroyImage
func (e *Environment) DestroyImage(imageID string) error
func (*Environment) DestroyVM
func (e *Environment) DestroyVM(id string) error
func (*Environment) ImageBuilds
func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
func (*Environment) Images
func (e *Environment) Images() ([]types.Image, error)
func (*Environment) Name
func (e *Environment) Name() string
func (*Environment) Profile
func (e *Environment) Profile() types.Profile
func (*Environment) RestartVM
func (e *Environment) RestartVM(id string) error
func (*Environment) StartVM
func (e *Environment) StartVM(id string) error
func (*Environment) StopVM
func (e *Environment) StopVM(id string) error
func (*Environment) VMs
func (e *Environment) VMs() []types.VM
type ImageBuildDate
type ImageBuildDate struct {
Name string
}
type Profile
type Profile struct {
// contains filtered or unexported fields
}
func (*Profile) Environments
func (p *Profile) Environments() []types.Environment
func (*Profile) GetConfig
func (p *Profile) GetConfig() common.ProfileConfig
func (*Profile) Name
func (p *Profile) Name() string
func (*Profile) Provider
func (p *Profile) Provider() types.Provider
func (*Profile) SetConfig
func (p *Profile) SetConfig(config common.ProfileConfig)
func (*Profile) ShouldIncludeEnvironment
func (p *Profile) ShouldIncludeEnvironment(envName string) bool
type Provider
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) GetConfig
func (p *Provider) GetConfig() common.ProviderConfig
func (*Provider) IsAvailable
func (p *Provider) IsAvailable() bool
func (*Provider) Name
func (p *Provider) Name() string
func (*Provider) NewImageBuild
func (p *Provider) NewImageBuild(name, tplDir string) (types.ImageBuild, error)
func (*Provider) NewProject
func (p *Provider) NewProject(name string, force bool) (types.Project, error)
func (*Provider) Profiles
func (p *Provider) Profiles() []types.Profile
func (*Provider) SetConfig
func (p *Provider) SetConfig(config common.ProviderConfig)
func (*Provider) Type
func (p *Provider) Type() string
3 - digitalocean
import "github.com/analog-substance/carbon/pkg/providers/digitalocean"
Index
- func New() types.Provider
- type Environment
- func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
- func (e *Environment) DestroyImage(imageID string) error
- func (e *Environment) DestroyVM(id string) error
- func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
- func (e *Environment) Images() ([]types.Image, error)
- func (e *Environment) Name() string
- func (e *Environment) Profile() types.Profile
- func (e *Environment) RestartVM(id string) error
- func (e *Environment) StartVM(id string) error
- func (e *Environment) StopVM(id string) error
- func (e *Environment) VMs() []types.VM
- type Profile
- type Provider
func New
func New() types.Provider
type Environment
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) CreateVM
func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
func (*Environment) DestroyImage
func (e *Environment) DestroyImage(imageID string) error
func (*Environment) DestroyVM
func (e *Environment) DestroyVM(id string) error
func (*Environment) ImageBuilds
func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
func (*Environment) Images
func (e *Environment) Images() ([]types.Image, error)
func (*Environment) Name
func (e *Environment) Name() string
func (*Environment) Profile
func (e *Environment) Profile() types.Profile
func (*Environment) RestartVM
func (e *Environment) RestartVM(id string) error
func (*Environment) StartVM
func (e *Environment) StartVM(id string) error
func (*Environment) StopVM
func (e *Environment) StopVM(id string) error
func (*Environment) VMs
func (e *Environment) VMs() []types.VM
type Profile
type Profile struct {
types.Profile
// contains filtered or unexported fields
}
func NewProfile
func NewProfile(name string, providerInstance *Provider, config common.ProfileConfig) *Profile
func (*Profile) Environments
func (p *Profile) Environments() []types.Environment
type Provider
type Provider struct {
types.Provider
// contains filtered or unexported fields
}
func (*Provider) IsAvailable
func (p *Provider) IsAvailable() bool
func (*Provider) Profiles
func (p *Provider) Profiles() []types.Profile
4 - example
import "github.com/analog-substance/carbon/pkg/providers/example"
Index
- func New() types.Provider
- type Environment
- func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
- func (e *Environment) DestroyImage(imageID string) error
- func (e *Environment) DestroyVM(id string) error
- func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
- func (e *Environment) Images() ([]types.Image, error)
- func (e *Environment) Name() string
- func (e *Environment) Profile() types.Profile
- func (e *Environment) RestartVM(id string) error
- func (e *Environment) StartVM(id string) error
- func (e *Environment) StopVM(id string) error
- func (e *Environment) VMs() []types.VM
- type Profile
- type Provider
func New
func New() types.Provider
type Environment
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) CreateVM
func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
func (*Environment) DestroyImage
func (e *Environment) DestroyImage(imageID string) error
func (*Environment) DestroyVM
func (e *Environment) DestroyVM(id string) error
func (*Environment) ImageBuilds
func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
func (*Environment) Images
func (e *Environment) Images() ([]types.Image, error)
func (*Environment) Name
func (e *Environment) Name() string
func (*Environment) Profile
func (e *Environment) Profile() types.Profile
func (*Environment) RestartVM
func (e *Environment) RestartVM(id string) error
func (*Environment) StartVM
func (e *Environment) StartVM(id string) error
func (*Environment) StopVM
func (e *Environment) StopVM(id string) error
func (*Environment) VMs
func (e *Environment) VMs() []types.VM
type Profile
type Profile struct {
types.Profile
}
func NewProfile
func NewProfile(name string, providerInstance *Provider, config common.ProfileConfig) *Profile
func (*Profile) Environments
func (p *Profile) Environments() []types.Environment
type Provider
type Provider struct {
types.Provider
// contains filtered or unexported fields
}
func (*Provider) IsAvailable
func (p *Provider) IsAvailable() bool
func (*Provider) Profiles
func (p *Provider) Profiles() []types.Profile
5 - multipass
import "github.com/analog-substance/carbon/pkg/providers/multipass"
Index
- func New() types.Provider
- type Environment
- func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
- func (e *Environment) DestroyImage(imageID string) error
- func (e *Environment) DestroyVM(id string) error
- func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
- func (e *Environment) Images() ([]types.Image, error)
- func (e *Environment) Name() string
- func (e *Environment) Profile() types.Profile
- func (e *Environment) RestartVM(id string) error
- func (e *Environment) StartVM(id string) error
- func (e *Environment) StopVM(id string) error
- func (e *Environment) VMs() []types.VM
- type Profile
- type Provider
func New
func New() types.Provider
type Environment
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) CreateVM
func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
func (*Environment) DestroyImage
func (e *Environment) DestroyImage(imageID string) error
func (*Environment) DestroyVM
func (e *Environment) DestroyVM(id string) error
func (*Environment) ImageBuilds
func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
func (*Environment) Images
func (e *Environment) Images() ([]types.Image, error)
func (*Environment) Name
func (e *Environment) Name() string
func (*Environment) Profile
func (e *Environment) Profile() types.Profile
func (*Environment) RestartVM
func (e *Environment) RestartVM(id string) error
func (*Environment) StartVM
func (e *Environment) StartVM(id string) error
func (*Environment) StopVM
func (e *Environment) StopVM(id string) error
func (*Environment) VMs
func (e *Environment) VMs() []types.VM
type Profile
type Profile struct {
types.Profile
}
func NewProfile
func NewProfile(name string, providerInstance *Provider, config common.ProfileConfig) *Profile
func (*Profile) Environments
func (p *Profile) Environments() []types.Environment
type Provider
type Provider struct {
types.Provider
// contains filtered or unexported fields
}
func (*Provider) IsAvailable
func (p *Provider) IsAvailable() bool
func (*Provider) Profiles
func (p *Provider) Profiles() []types.Profile
5.1 - api
import "github.com/analog-substance/carbon/pkg/providers/multipass/api"
Index
- func AppPath() string
- func RestartVM(id string) error
- func SleepVM(id string) error
- func StartVM(id string) error
- type MultipassListOutput
- type MultipassVM
func AppPath
func AppPath() string
func RestartVM
func RestartVM(id string) error
func SleepVM
func SleepVM(id string) error
func StartVM
func StartVM(id string) error
type MultipassListOutput
type MultipassListOutput struct {
List []MultipassVM `json:"list"`
}
type MultipassVM
type MultipassVM struct {
Ipv4 []string `json:"ipv4"`
Name string `json:"name"`
Release string `json:"release"`
State string `json:"state"`
}
func ListVMs
func ListVMs() []MultipassVM
6 - qemu
import "github.com/analog-substance/carbon/pkg/providers/qemu"
Index
- func New() types.Provider
- type Environment
- func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
- func (e *Environment) DestroyImage(imageID string) error
- func (e *Environment) DestroyVM(id string) error
- func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
- func (e *Environment) Images() ([]types.Image, error)
- func (e *Environment) Name() string
- func (e *Environment) Profile() types.Profile
- func (e *Environment) RestartVM(id string) error
- func (e *Environment) StartVM(id string) error
- func (e *Environment) StopVM(id string) error
- func (e *Environment) VMs() []types.VM
- type Profile
- type Provider
func New
func New() types.Provider
type Environment
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) CreateVM
func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
func (*Environment) DestroyImage
func (e *Environment) DestroyImage(imageID string) error
func (*Environment) DestroyVM
func (e *Environment) DestroyVM(id string) error
func (*Environment) ImageBuilds
func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
func (*Environment) Images
func (e *Environment) Images() ([]types.Image, error)
func (*Environment) Name
func (e *Environment) Name() string
func (*Environment) Profile
func (e *Environment) Profile() types.Profile
func (*Environment) RestartVM
func (e *Environment) RestartVM(id string) error
func (*Environment) StartVM
func (e *Environment) StartVM(id string) error
func (*Environment) StopVM
func (e *Environment) StopVM(id string) error
func (*Environment) VMs
func (e *Environment) VMs() []types.VM
type Profile
type Profile struct {
types.Profile
}
func NewProfile
func NewProfile(name string, providerInstance *Provider, config common.ProfileConfig) *Profile
func (*Profile) Environments
func (p *Profile) Environments() []types.Environment
type Provider
type Provider struct {
types.Provider
// contains filtered or unexported fields
}
func (*Provider) IsAvailable
func (p *Provider) IsAvailable() bool
func (*Provider) Profiles
func (p *Provider) Profiles() []types.Profile
6.1 - api
import "github.com/analog-substance/carbon/pkg/providers/qemu/api"
Index
- type Domain
- type QEMU
- func Connect(libVirtURL string) (*QEMU, error)
- func (q *QEMU) AllNetworks() ([]libvirt.Network, error)
- func (q *QEMU) Close() error
- func (q *QEMU) CreateDomain(name string, storageVol *StorageVolume) (*Domain, error)
- func (q *QEMU) GetDomain(id string) (*Domain, error)
- func (q *QEMU) GetDomains() ([]*Domain, error)
- func (q *QEMU) GetStoragePool(name string) (*StoragePool, error)
- func (q *QEMU) GetStoragePools() ([]*StoragePool, error)
- type StoragePool
- type StorageVolume
type Domain
type Domain struct {
LVDomain *libvirt.Domain
LVDomainState *libvirt.DomainState
ID string
Name string
PublicIPAddresses []string
PrivateIPAddresses []string
CurrentUpTime time.Duration
// contains filtered or unexported fields
}
func (*Domain) Destroy
func (d *Domain) Destroy() error
func (*Domain) Reboot
func (d *Domain) Reboot() error
func (*Domain) Start
func (d *Domain) Start() error
func (*Domain) Suspend
func (d *Domain) Suspend() error
type QEMU
type QEMU struct {
// contains filtered or unexported fields
}
func Connect
func Connect(libVirtURL string) (*QEMU, error)
func (*QEMU) AllNetworks
func (q *QEMU) AllNetworks() ([]libvirt.Network, error)
func (*QEMU) Close
func (q *QEMU) Close() error
func (*QEMU) CreateDomain
func (q *QEMU) CreateDomain(name string, storageVol *StorageVolume) (*Domain, error)
func (*QEMU) GetDomain
func (q *QEMU) GetDomain(id string) (*Domain, error)
func (*QEMU) GetDomains
func (q *QEMU) GetDomains() ([]*Domain, error)
func (*QEMU) GetStoragePool
func (q *QEMU) GetStoragePool(name string) (*StoragePool, error)
func (*QEMU) GetStoragePools
func (q *QEMU) GetStoragePools() ([]*StoragePool, error)
type StoragePool
type StoragePool struct {
LVStoragePool *libvirt.StoragePool
Volumes []*StorageVolume
// contains filtered or unexported fields
}
func (*StoragePool) GetVolumes
func (s *StoragePool) GetVolumes() ([]*StorageVolume, error)
func (*StoragePool) ImportImage
func (s *StoragePool) ImportImage(name string, imageFile string) (*StorageVolume, error)
type StorageVolume
type StorageVolume struct {
LVStorageVolume *libvirt.StorageVol
// contains filtered or unexported fields
}
7 - virtualbox
import "github.com/analog-substance/carbon/pkg/providers/virtualbox"
Index
- func New() types.Provider
- type Environment
- func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
- func (e *Environment) DestroyImage(imageID string) error
- func (e *Environment) DestroyVM(id string) error
- func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
- func (e *Environment) Images() ([]types.Image, error)
- func (e *Environment) Name() string
- func (e *Environment) Profile() types.Profile
- func (e *Environment) RestartVM(id string) error
- func (e *Environment) StartVM(id string) error
- func (e *Environment) StopVM(id string) error
- func (e *Environment) VMs() []types.VM
- type Profile
- type Provider
func New
func New() types.Provider
type Environment
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) CreateVM
func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
func (*Environment) DestroyImage
func (e *Environment) DestroyImage(imageID string) error
func (*Environment) DestroyVM
func (e *Environment) DestroyVM(id string) error
func (*Environment) ImageBuilds
func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
func (*Environment) Images
func (e *Environment) Images() ([]types.Image, error)
func (*Environment) Name
func (e *Environment) Name() string
func (*Environment) Profile
func (e *Environment) Profile() types.Profile
func (*Environment) RestartVM
func (e *Environment) RestartVM(id string) error
func (*Environment) StartVM
func (e *Environment) StartVM(id string) error
func (*Environment) StopVM
func (e *Environment) StopVM(id string) error
func (*Environment) VMs
func (e *Environment) VMs() []types.VM
type Profile
type Profile struct {
types.Profile
}
func NewProfile
func NewProfile(name string, providerInstance *Provider, config common.ProfileConfig) *Profile
func (*Profile) Environments
func (p *Profile) Environments() []types.Environment
type Provider
type Provider struct {
types.Provider
// contains filtered or unexported fields
}
func (*Provider) IsAvailable
func (p *Provider) IsAvailable() bool
func (*Provider) Profiles
func (p *Provider) Profiles() []types.Profile
7.1 - api
import "github.com/analog-substance/carbon/pkg/providers/virtualbox/api"
Index
- func AppPath() string
- func RestartVM(id string) error
- func SleepVM(id string) error
- func StartVM(id string) error
- type VBoxVM
func AppPath
func AppPath() string
func RestartVM
func RestartVM(id string) error
func SleepVM
func SleepVM(id string) error
func StartVM
func StartVM(id string) error
type VBoxVM
type VBoxVM struct {
Name string
ID string
State string
GuestOS string
UpTime time.Duration
PrivateIPAddresses []string
// contains filtered or unexported fields
}
func ListVMs
func ListVMs() []VBoxVM
8 - vsphere
import "github.com/analog-substance/carbon/pkg/providers/vsphere"
Index
- func New() types.Provider
- type Environment
- func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
- func (e *Environment) DestroyImage(imageID string) error
- func (e *Environment) DestroyVM(id string) error
- func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
- func (e *Environment) Images() ([]types.Image, error)
- func (e *Environment) Name() string
- func (e *Environment) Profile() types.Profile
- func (e *Environment) RestartVM(id string) error
- func (e *Environment) StartVM(id string) error
- func (e *Environment) StopVM(id string) error
- func (e *Environment) VMs() []types.VM
- type Profile
- type Provider
func New
func New() types.Provider
type Environment
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) CreateVM
func (e *Environment) CreateVM(options types.MachineLaunchOptions) error
func (*Environment) DestroyImage
func (e *Environment) DestroyImage(imageID string) error
func (*Environment) DestroyVM
func (e *Environment) DestroyVM(id string) error
func (*Environment) ImageBuilds
func (e *Environment) ImageBuilds() ([]types.ImageBuild, error)
func (*Environment) Images
func (e *Environment) Images() ([]types.Image, error)
func (*Environment) Name
func (e *Environment) Name() string
func (*Environment) Profile
func (e *Environment) Profile() types.Profile
func (*Environment) RestartVM
func (e *Environment) RestartVM(id string) error
func (*Environment) StartVM
func (e *Environment) StartVM(id string) error
func (*Environment) StopVM
func (e *Environment) StopVM(id string) error
func (*Environment) VMs
func (e *Environment) VMs() []types.VM
type Profile
type Profile struct {
types.Profile
// contains filtered or unexported fields
}
func NewProfile
func NewProfile(name string, providerInstance *Provider, config common.ProfileConfig) *Profile
func (*Profile) Environments
func (p *Profile) Environments() []types.Environment
type Provider
type Provider struct {
types.Provider
// contains filtered or unexported fields
}
func (*Provider) IsAvailable
func (p *Provider) IsAvailable() bool
func (*Provider) Profiles
func (p *Provider) Profiles() []types.Profile