Documentation ¶
Overview ¶
Package diskclient implements the client for Disks.
Index ¶
- Constants
- type Client
- func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, ...) *retry.Error
- func (c *Client) Delete(ctx context.Context, resourceGroupName string, diskName string) *retry.Error
- func (c *Client) Get(ctx context.Context, resourceGroupName string, diskName string) (compute.Disk, *retry.Error)
- func (c *Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Disk, *retry.Error)
- func (c *Client) Update(ctx context.Context, resourceGroupName string, diskName string, ...) *retry.Error
- type DiskListPage
- type Interface
Constants ¶
const ( // APIVersion is the API version for compute. APIVersion = "2020-12-01" // AzureStackCloudAPIVersion is the API version for Azure Stack AzureStackCloudAPIVersion = "2019-03-01" // AzureStackCloudName is the cloud name of Azure Stack AzureStackCloudName = "AZURESTACKCLOUD" )
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 Disk client Interface.
func New ¶
func New(config *azclients.ClientConfig) *Client
New creates a new Disk client with ratelimiting.
func (*Client) CreateOrUpdate ¶
func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, diskParameter compute.Disk) *retry.Error
CreateOrUpdate creates or updates a Disk.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, resourceGroupName string, diskName string) *retry.Error
Delete deletes a Disk by name.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, resourceGroupName string, diskName string) (compute.Disk, *retry.Error)
Get gets a Disk.
type DiskListPage ¶
type DiskListPage struct {
// contains filtered or unexported fields
}
DiskListPage contains a page of Disk values.
func (*DiskListPage) Next ¶
func (page *DiskListPage) 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 (*DiskListPage) NextWithContext ¶
func (page *DiskListPage) 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 (DiskListPage) NotDone ¶
func (page DiskListPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (DiskListPage) Response ¶
func (page DiskListPage) Response() compute.DiskList
Response returns the raw server response from the last page request.
func (DiskListPage) Values ¶
func (page DiskListPage) Values() []compute.Disk
Values returns the slice of values for the current page or nil if there are no values.
type Interface ¶
type Interface interface { // Get gets a Disk. Get(ctx context.Context, resourceGroupName string, diskName string) (result compute.Disk, rerr *retry.Error) // CreateOrUpdate creates or updates a Disk. CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, diskParameter compute.Disk) *retry.Error // Update updates a Disk. Update(ctx context.Context, resourceGroupName string, diskName string, diskParameter compute.DiskUpdate) *retry.Error // Delete deletes a Disk by name. Delete(ctx context.Context, resourceGroupName string, diskName string) *retry.Error // ListByResourceGroup lists all the disks under a resource group. ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Disk, *retry.Error) }
Interface is the client interface for Disks. Don't forget to run the following command to generate the mock client: mockgen -source=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go -package=mockdiskclient Interface > $GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/mockdiskclient/interface.go
Directories ¶
Path | Synopsis |
---|---|
Package mockdiskclient implements the mock client for Disks.
|
Package mockdiskclient implements the mock client for Disks. |