vmssclient

package
v0.0.0-...-d88c8b5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package vmssclient implements the client for VMSS.

Index

Constants

View Source
const (
	// APIVersion is the API version for VMSS.
	APIVersion = "2019-07-01"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {

	// ARM throttling configures.
	RetryAfterReader time.Time
	RetryAfterWriter time.Time
	// contains filtered or unexported fields
}

Client implements VMSS client Interface.

func New

func New(config *azclients.ClientConfig) *Client

New creates a new VMSS client with ratelimiting.

func (*Client) CreateOrUpdate

func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) *retry.Error

CreateOrUpdate creates or updates a VirtualMachineScaleSet.

func (*Client) DeleteInstances

func (c *Client) DeleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error

DeleteInstances deletes the instances for a VirtualMachineScaleSet.

func (*Client) Get

func (c *Client) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (compute.VirtualMachineScaleSet, *retry.Error)

Get gets a VirtualMachineScaleSet.

func (*Client) List

func (c *Client) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, *retry.Error)

List gets a list of VirtualMachineScaleSets in the resource group.

type Interface

type Interface interface {
	// Get gets a VirtualMachineScaleSet.
	Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, rerr *retry.Error)

	// List gets a list of VirtualMachineScaleSets in the resource group.
	List(ctx context.Context, resourceGroupName string) (result []compute.VirtualMachineScaleSet, rerr *retry.Error)

	// CreateOrUpdate creates or updates a VirtualMachineScaleSet.
	CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) *retry.Error

	// DeleteInstances deletes the instances for a VirtualMachineScaleSet.
	DeleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error
}

Interface is the client interface for VirtualMachineScaleSet. Don't forget to run the following command to generate the mock client: mockgen -source=$GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/interface.go -package=mockvmssclient Interface > $GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go

type VirtualMachineScaleSetListResultPage

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

VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.

func (*VirtualMachineScaleSetListResultPage) Next

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*VirtualMachineScaleSetListResultPage) NextWithContext

func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (VirtualMachineScaleSetListResultPage) NotDone

NotDone returns true if the page enumeration should be started or is not yet complete.

func (VirtualMachineScaleSetListResultPage) Response

Response returns the raw server response from the last page request.

func (VirtualMachineScaleSetListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

Jump to

Keyboard shortcuts

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