Documentation
¶
Index ¶
- func GetLbClient() network.LoadBalancersClient
- func GetNicClient() network.InterfacesClient
- func GetVmClient() compute.VirtualMachinesClient
- type AzureClient
- func (az AzureClient) GetAllLoadBalancer() (network.LoadBalancerListResultPage, error)
- func (az AzureClient) GetAllNics() network.InterfaceListResultPage
- func (az AzureClient) GetAllVM() (result compute.VirtualMachineListResultPage)
- func (az AzureClient) GetNicFromVMName(nodename string) (network.Interface, error)
- func (az AzureClient) GetVM(ctx context.Context, nodename string) (compute.VirtualMachine, error)
- func (az AzureClient) PutVM(nodename string) (res autorest.Response)
- type ComputeInstanceMetadata
- type Config
- type JsonData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AzureClient ¶
type AzureClient struct { compute.VirtualMachinesClient network.InterfacesClient network.LoadBalancersClient }
AzureClient This is an authorized client for Azure communication.
var Client AzureClient
Client Authorized Azure Client
func NewClient ¶
func NewClient() (client AzureClient)
NewClient Initialized an authorized Azure client
func (AzureClient) GetAllLoadBalancer ¶
func (az AzureClient) GetAllLoadBalancer() (network.LoadBalancerListResultPage, error)
GetAllLoadBalancer return info on a loadbalancer
func (AzureClient) GetAllNics ¶
func (az AzureClient) GetAllNics() network.InterfaceListResultPage
GetAllNics Returns a ListResultPage of all Interfaces in the ResourceGroup of the Config
func (AzureClient) GetAllVM ¶
func (az AzureClient) GetAllVM() (result compute.VirtualMachineListResultPage)
GetAllVM Returns a ListResultPage of all VMs in the ResourceGroup of the Config
func (AzureClient) GetNicFromVMName ¶
func (az AzureClient) GetNicFromVMName(nodename string) (network.Interface, error)
GetNicFromVMName returns primary nic object based on vm name
func (AzureClient) GetVM ¶
func (az AzureClient) GetVM(ctx context.Context, nodename string) (compute.VirtualMachine, error)
GetVM Returns a VirtualMachine object.
type ComputeInstanceMetadata ¶
type ComputeInstanceMetadata struct { Environment string `json:"azEnvironment,omitempty"` Location string `json:"location,omitempty"` Name string `json:"name,omitempty"` Offer string `json:"offer,omitempty"` OsType string `json:"osType,omitempty"` PlacementGroupID string `json:"placement_group_id,omitempty"` Plan map[string]string `json:"plan,omitempty"` PlatformFaultDomain string `json:"platformFaultDomain,omitempty"` PlatformUpdateDomain string `json:"platformUpdateDomain,omitempty"` Provider string `json:"provider,omitempty"` PublicKeys []map[string]string `json:"publicKeys,omitempty"` Publisher string `json:"publisher,omitempty"` ResourceGroupName string `json:"resourceGroupName,omitempty"` Sku string `json:"sku,omitempty"` SubscriptionID string `json:"subscriptionId,omitempty"` Tags string `json:"tags,omitempty"` Version string `json:"version,omitempty"` VMID string `json:"vmId,omitempty"` VMScaleSetName string `json:"vmScaleSetName,omitempty"` VMSize string `json:"vmSize,omitempty"` Zone string `json:"zone,omitempty"` }
ComputeInstanceMetadata denotes the compute specific instance metadata from Azure Instance Metadata Service
type Config ¶
type Config struct { VMName string SubscriptionID string Location string ResourceGroup string AzureEnvironment string EnvironmentEndpoint string }
Config returns a config with the Azure resource group and Azure location to perform requests
func LoadConfig ¶
func LoadConfig() (config Config)
LoadConfig Returns a Config struct created from Environment Variables