Documentation ¶
Overview ¶
Package vmclient implements the client for VirtualMachines.
Index ¶
- Constants
- type Client
- func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, ...) *retry.Error
- func (c *Client) Delete(ctx context.Context, resourceGroupName string, VMName string) *retry.Error
- func (c *Client) Get(ctx context.Context, resourceGroupName string, VMName string, ...) (compute.VirtualMachine, *retry.Error)
- func (c *Client) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error)
- func (c *Client) Update(ctx context.Context, resourceGroupName string, VMName string, ...) *retry.Error
- type Interface
- type VirtualMachineListResultPage
- func (page *VirtualMachineListResultPage) Next() error
- func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error)
- func (page VirtualMachineListResultPage) NotDone() bool
- func (page VirtualMachineListResultPage) Response() compute.VirtualMachineListResult
- func (page VirtualMachineListResultPage) Values() []compute.VirtualMachine
Constants ¶
const (
// APIVersion is the API version for VirtualMachine.
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 VirtualMachine client Interface.
func New ¶
func New(config *azclients.ClientConfig) *Client
New creates a new VirtualMachine client with ratelimiting.
func (*Client) CreateOrUpdate ¶
func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine, source string) *retry.Error
CreateOrUpdate creates or updates a VirtualMachine.
func (*Client) Delete ¶
Delete deletes a VirtualMachine.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error)
Get gets a VirtualMachine.
type Interface ¶
type Interface interface { // Get gets a VirtualMachine. Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error) // List gets a list of VirtualMachines in the resourceGroupName. List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error) // CreateOrUpdate creates or updates a VirtualMachine. CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine, source string) *retry.Error // Update updates a VirtualMachine. Update(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error // Delete deletes a VirtualMachine. Delete(ctx context.Context, resourceGroupName string, VMName string) *retry.Error }
Interface is the client interface for VirtualMachines. 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/vmclient/interface.go -package=mockvmclient Interface > $GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go
type VirtualMachineListResultPage ¶
type VirtualMachineListResultPage struct {
// contains filtered or unexported fields
}
VirtualMachineListResultPage contains a page of VirtualMachine values.
func (*VirtualMachineListResultPage) Next ¶
func (page *VirtualMachineListResultPage) Next() error
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 (*VirtualMachineListResultPage) NextWithContext ¶
func (page *VirtualMachineListResultPage) 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 (VirtualMachineListResultPage) NotDone ¶
func (page VirtualMachineListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (VirtualMachineListResultPage) Response ¶
func (page VirtualMachineListResultPage) Response() compute.VirtualMachineListResult
Response returns the raw server response from the last page request.
func (VirtualMachineListResultPage) Values ¶
func (page VirtualMachineListResultPage) Values() []compute.VirtualMachine
Values returns the slice of values for the current page or nil if there are no values.