api

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAzureCloudName

func GetAzureCloudName(ctx context.Context) (string, error)

GetAzureCloudName retrieves the current Azure cloud name in which the host running the Cilium Operator is located This is retrieved via the Azure Instance Metadata Service

func GetResourceGroupName

func GetResourceGroupName(ctx context.Context) (string, error)

GetResourceGroupName retrieves the current resource group name in which the host running the Cilium Operator is located This is retrieved via the Azure Instance Metadata Service

func GetSubscriptionID

func GetSubscriptionID(ctx context.Context) (string, error)

GetSubscriptionID retrieves the Azure subscriptionID from the Azure Instance Metadata Service

Types

type Client

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

Client represents an Azure API client

func NewClient

func NewClient(cloudName, subscriptionID, resourceGroup, userAssignedIdentityID string, metrics MetricsAPI, rateLimit float64, burst int, usePrimary bool) (*Client, error)

NewClient returns a new Azure client

func (*Client) AssignPrivateIpAddressesVM

func (c *Client) AssignPrivateIpAddressesVM(ctx context.Context, subnetID, interfaceName string, addresses int) error

AssignPrivateIpAddressesVM assign a private IP to an interface attached to a standalone instance

func (*Client) AssignPrivateIpAddressesVMSS

func (c *Client) AssignPrivateIpAddressesVMSS(ctx context.Context, instanceID, vmssName, subnetID, interfaceName string, addresses int) error

AssignPrivateIpAddressesVMSS assign a private IP to an interface attached to a VMSS instance

func (*Client) GetInstances

func (c *Client) GetInstances(ctx context.Context, subnets ipamTypes.SubnetMap) (*ipamTypes.InstanceMap, error)

GetInstances returns the list of all instances including all attached interfaces as instanceMap

func (*Client) GetVpcsAndSubnets

func (c *Client) GetVpcsAndSubnets(ctx context.Context) (ipamTypes.VirtualNetworkMap, ipamTypes.SubnetMap, error)

GetVpcsAndSubnets retrieves and returns all Vpcs

type MetricsAPI

type MetricsAPI interface {
	ObserveAPICall(call, status string, duration float64)
	ObserveRateLimit(operation string, duration time.Duration)
}

MetricsAPI represents the metrics maintained by the Azure API client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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