providers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidProvider = errors.New("not a valid Provider")

Functions

This section is empty.

Types

type GPUWatt added in v0.2.0

type GPUWatt struct {
	Name     string
	MinWatts decimal.Decimal
	MaxWatts decimal.Decimal
}

GPUWatt is the struct that contains the min and max watts of a GPU

func GetGPUWatt added in v0.2.0

func GetGPUWatt(gpuName string) GPUWatt

GetGPUWatt returns the min and max watts of a GPU

type Provider

type Provider int

ENUM(AWS, AZURE, GCP)

const (
	// AWS is a Provider of type AWS.
	AWS Provider = iota
	// AZURE is a Provider of type AZURE.
	AZURE
	// GCP is a Provider of type GCP.
	GCP
)

func ParseProvider added in v0.3.0

func ParseProvider(name string) (Provider, error)

ParseProvider attempts to convert a string to a Provider.

func (Provider) MarshalText added in v0.3.0

func (x Provider) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method.

func (Provider) String

func (x Provider) String() string

String implements the Stringer interface.

func (*Provider) UnmarshalText added in v0.3.0

func (x *Provider) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method.

type UnsupportedProviderError

type UnsupportedProviderError struct {
	Provider string
}

UnsupportedProviderError is an error that occurs when a provider is not supported

func (*UnsupportedProviderError) Error

func (upe *UnsupportedProviderError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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