provider

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: GPL-3.0 Imports: 30 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAzureStorageAccountName

func GetAzureStorageAccountName(p CloudProvider) string

Azure Provider helper function specific to the azure provider to determine the storage account name derived from the default resource group name.

func NewCloudProviderTemplates

func NewCloudProviderTemplates() (map[string]CloudProvider, error)

out: a map of included cloud provider templates

func SortCloudProviders

func SortCloudProviders(providers []CloudProvider)

sorts the given slice of cloud provider structs in ascending order of name

Types

type CloudProvider

type CloudProvider interface {
	config.Configurable

	// Connects to the cloud provider using the
	// configured credentials
	Connect() error

	// The currently configured region for this provider
	Region() *string

	// List of regions for the client. If the provider
	// instances is not configured then a static list
	// is returned. Otherwise the list retrieved from
	// the cloud API is returned.
	GetRegions() []RegionInfo

	// Returns the provider's compute entity
	GetCompute() (cloud.Compute, error)

	// Returns the provider's storage entity
	GetStorage() (cloud.Storage, error)

	// adds the provider configuration variables
	// to the given variable map
	GetVars(vars map[string]string) error
}

interface for a configurable cloud provider

func NewCloudProvider

func NewCloudProvider(iaas string) (CloudProvider, error)

in: the iaas to create a cloud provider configuration template for out: a cloud provider configuration template

type RegionInfo

type RegionInfo struct {
	Name        string
	Description string
}

Jump to

Keyboard shortcuts

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