virtualmachineimages

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureClient

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

AzureClient contains the Azure go-sdk Client.

func NewClient

func NewClient(auth azure.Authorizer) *AzureClient

NewClient creates a new VM images client from auth info.

func (*AzureClient) List

func (ac *AzureClient) List(ctx context.Context, location, publisher, offer, sku string) (compute.ListVirtualMachineImageResource, error)

List returns a VM image list resource.

type Cache

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

Cache stores VM image list resources.

func GetCache

func GetCache(auth azure.Authorizer) (*Cache, error)

GetCache either creates a new VM images cache or returns the existing one.

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, location, publisher, offer, sku string) (compute.ListVirtualMachineImageResource, error)

Get returns a VM image list resource in a location given a publisher, offer, and sku.

type Cacher

type Cacher interface {
	Get(key interface{}) (value interface{}, ok bool)
	Add(key interface{}, value interface{}) bool
}

Cacher allows getting items from and adding them to a cache.

type Client

type Client interface {
	List(ctx context.Context, location, publisher, offer, sku string) (compute.ListVirtualMachineImageResource, error)
}

Client is an interface for listing VM images.

type Key

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

Key contains the fields necessary to locate a VM image list resource.

type Service

type Service struct {
	Client
	azure.Authorizer
}

Service provides operations on Azure VM Images.

func New

func New(auth azure.Authorizer) *Service

New creates a new VM Images service.

func (*Service) GetDefaultUbuntuImage

func (s *Service) GetDefaultUbuntuImage(ctx context.Context, location, k8sVersion string) (*infrav1.Image, error)

GetDefaultUbuntuImage returns the default image spec for Ubuntu.

func (*Service) GetDefaultWindowsImage

func (s *Service) GetDefaultWindowsImage(ctx context.Context, location, k8sVersion, runtime, osAndVersion string) (*infrav1.Image, error)

GetDefaultWindowsImage returns the default image spec for Windows.

Directories

Path Synopsis
Package mock_virtualmachineimages is a generated GoMock package.
Package mock_virtualmachineimages is a generated GoMock package.

Jump to

Keyboard shortcuts

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