computeresource

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VM   string = "virtualMachines"
	VMSS string = "virtualMachineScaleSets"
)

Variables

This section is empty.

Functions

func VMUserAssignedIdentity

func VMUserAssignedIdentity(vm compute.VirtualMachine) compute.VirtualMachine

Types

type ComputeResource

type ComputeResource interface {
	Name() string
	ID() string
	Tags() map[string]*string
	SetTag(name string, value *string)
	Update(ctx context.Context) error
}

ComputeResource is a compute resource such as a Virtual Machine that should have its labels propagated to nodes running on the compute resource

type FakeComputeResource

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

func NewFakeComputeResource

func NewFakeComputeResource(labelMap map[string]*string) *FakeComputeResource

func (FakeComputeResource) ID

func (c FakeComputeResource) ID() string

func (FakeComputeResource) Name

func (c FakeComputeResource) Name() string

func (FakeComputeResource) SetTag

func (c FakeComputeResource) SetTag(name string, value *string)

func (FakeComputeResource) Tags

func (c FakeComputeResource) Tags() map[string]*string

func (FakeComputeResource) Update

func (c FakeComputeResource) Update(ctx context.Context) error

type VirtualMachine

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

func NewVM

func NewVM(ctx context.Context, subscriptionID, resourceGroup, resourceName string) (*VirtualMachine, error)

func (VirtualMachine) ID

func (m VirtualMachine) ID() string

func (VirtualMachine) Name

func (m VirtualMachine) Name() string

func (VirtualMachine) SetTag

func (m VirtualMachine) SetTag(name string, value *string)

func (VirtualMachine) Tags

func (m VirtualMachine) Tags() map[string]*string

func (VirtualMachine) Update

func (m VirtualMachine) Update(ctx context.Context) error

type VirtualMachineScaleSet

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

func NewVMSS

func NewVMSS(ctx context.Context, subscriptionID, resourceGroup, resourceName string) (*VirtualMachineScaleSet, error)

func (VirtualMachineScaleSet) ID

func (VirtualMachineScaleSet) Name

func (m VirtualMachineScaleSet) Name() string

func (VirtualMachineScaleSet) SetTag

func (m VirtualMachineScaleSet) SetTag(name string, value *string)

func (VirtualMachineScaleSet) Tags

func (m VirtualMachineScaleSet) Tags() map[string]*string

func (VirtualMachineScaleSet) Update

Jump to

Keyboard shortcuts

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