Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Index ¶
Constants ¶
View Source
const ( // ImdsInstanceAPIVersion is the imds instance api version ImdsInstanceAPIVersion = "2021-10-01" // ImdsLoadBalancerAPIVersion is the imds load balancer api version ImdsLoadBalancerAPIVersion = "2020-10-01" // ImdsServer is the imds server endpoint ImdsServer = "http://169.254.169.254" // ImdsInstanceURI is the imds instance uri ImdsInstanceURI = "/metadata/instance" // ImdsLoadBalancerURI is the imds load balancer uri ImdsLoadBalancerURI = "/metadata/loadbalancer" // ImdsUserAgent is the user agent to query Imds ImdsUserAgent = "golang/kube-egress-gateway" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputeMetadata ¶
type ComputeMetadata struct { AzEnvironment string `json:"azEnvironment"` Location string `json:"location"` Name string `json:"name"` OSType string `json:"osType"` OSProfile OSProfile `json:"osProfile"` ResourceGroupName string `json:"resourceGroupName"` ResourceID string `json:"resourceId"` SubscriptionID string `json:"subscriptionId"` Tags string `json:"tags"` VMScaleSetName string `json:"vmScaleSetName"` }
type InstanceMetadata ¶
type InstanceMetadata struct { Compute *ComputeMetadata `json:"compute"` Network *NetworkMetadata `json:"network"` }
func GetInstanceMetadata ¶
func GetInstanceMetadata() (*InstanceMetadata, error)
type LBData ¶
type LBData struct {
PublicIPAddresses []PublicIPMetadata `json:"publicIpAddresses"`
}
type LoadBalancerMetadata ¶
type LoadBalancerMetadata struct {
LoadBalancer LBData `json:"loadbalancer"`
}
func GetLoadBalancerMetadata ¶
func GetLoadBalancerMetadata() (*LoadBalancerMetadata, error)
type NetworkInterface ¶
type NetworkMetadata ¶
type NetworkMetadata struct {
Interface []NetworkInterface `json:"interface"`
}
type OSProfile ¶ added in v0.0.7
type OSProfile struct {
ComputerName string `json:"computerName"`
}
type PublicIPMetadata ¶
Click to show internal directories.
Click to hide internal directories.