vmcapabilities

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CapabilitySupported is the value returned by this API from Azure when the capability is supported
	CapabilitySupported = "True"

	CapabilityAcceleratedNetworking = "AcceleratedNetworkingEnabled"
	CapabilityPremiumIO             = "PremiumIO"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidRequest

func IsInvalidRequest(err error) bool

IsInvalidRequest asserts invalidRequestError.

func IsInvalidUpstreamResponse

func IsInvalidUpstreamResponse(err error) bool

IsInvalidUpstreamResponse asserts invalidUpstreamResponseError.

func IsSkuNotFoundError

func IsSkuNotFoundError(err error) bool

IsSkuNotFoundError asserts skuNotFoundError.

Types

type API

type API interface {
	List(ctx context.Context, filter string) (map[string]compute.ResourceSku, error)
}

func NewAzureAPI

func NewAzureAPI(c AzureConfig) API

type Azure

type Azure struct {
	// contains filtered or unexported fields
}

func (*Azure) List

func (a *Azure) List(ctx context.Context, filter string) (map[string]compute.ResourceSku, error)

type AzureConfig

type AzureConfig struct {
	ResourceSkuClient *compute.ResourceSkusClient
}

type Config

type Config struct {
	Azure  API
	Logger micrologger.Logger
}

type VMSKU

type VMSKU struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) (*VMSKU, error)

func (*VMSKU) CPUs

func (v *VMSKU) CPUs(ctx context.Context, location string, vmType string) (int, error)

func (*VMSKU) HasCapability

func (v *VMSKU) HasCapability(ctx context.Context, location string, vmType string, name string) (bool, error)

func (*VMSKU) Memory

func (v *VMSKU) Memory(ctx context.Context, location string, vmType string) (int, error)

func (*VMSKU) SupportedAZs

func (v *VMSKU) SupportedAZs(ctx context.Context, location string, vmType string) ([]string, error)

Jump to

Keyboard shortcuts

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