Documentation ¶
Index ¶
Constants ¶
View Source
const (
MetdataDomain = "provider.unikorn-cloud.org"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Flavor ¶
type Flavor struct { // ID must be an immutable ID, preferably a UUID. // If the provider doesn't have the concept of an ID, and the name // is immutable you can make one out of that. ID string // Name of the flavor. Name string // CPU count. CPUs int // Memory available. Memory *resource.Quantity // Disk available. Disk *resource.Quantity // GPU count. GPUs int // GPUVendor is who makes the GPU, used to determine the drivers etc. GPUVendor GPUVendor // BareMetal is a bare-metal flavor. BareMetal bool }
Flavor represents a machine type.
type FlavorList ¶
type FlavorList []Flavor
FlavorList allows us to attach sort functions and the like.
func (FlavorList) Len ¶
func (l FlavorList) Len() int
func (FlavorList) Less ¶
func (l FlavorList) Less(i, j int) bool
func (FlavorList) Swap ¶
func (l FlavorList) Swap(i, j int)
type Image ¶
type Image struct { // ID must be an immutable ID, preferably a UUID. // If the provider doesn't have the concept of an ID, and the name // is immutable you can make one out of that. ID string // Name of the image. Name string // Created is when the image was created. Created time.Time // Modified is when the image was modified. Modified time.Time // KubernetesVersion is only populated if the image contains a pre-installed // version of Kubernetes, this acts as a cache and improves provisioning performance. // This is pretty much the only source of truth about Kubernetes versions at // present, so should be populated. It must be a semver (starts with a vN.N.N). KubernetesVersion string }
Image represents an operating system image.
type Provider ¶
type Provider interface { // Flavors list all available flavors. Flavors(ctx context.Context) (FlavorList, error) // Images lists all available images. Images(ctx context.Context) (ImageList, error) }
Providers are expected to provide a provider agnostic manner. They are also expected to provide any caching or memoization required to provide high performance and a decent UX.
Click to show internal directories.
Click to hide internal directories.