Documentation ¶
Index ¶
- func New(opts ...CollectorOption) metadatax.Collector
- type AzureMetadata
- type AzureMetadataAdditionalCapabilities
- type AzureMetadataCompute
- type AzureMetadataExtendedLocation
- type AzureMetadataHost
- type AzureMetadataHostGroup
- type AzureMetadataIPAddress
- type AzureMetadataIPv4
- type AzureMetadataIPv6
- type AzureMetadataInstance
- type AzureMetadataLB
- type AzureMetadataLoadBalancer
- type AzureMetadataLoadBalancerPublicIPAddress
- type AzureMetadataNetwork
- type AzureMetadataNetworkInterface
- type AzureMetadataOSProfile
- type AzureMetadataPlan
- type AzureMetadataPublicKey
- type AzureMetadataSecurityProfile
- type AzureMetadataSubnet
- type AzureMetadataTag
- type AzureMetadataVirtualMachineScaleSet
- type CollectorOption
- type GetAzureMetadataFunc
- type MetadataGetterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...CollectorOption) metadatax.Collector
Types ¶
type AzureMetadata ¶
type AzureMetadata interface { GetInstanceMetadata(ctx context.Context) (*AzureMetadataInstance, error) GetLoadBalancerMetadata(ctx context.Context) (*AzureMetadataLoadBalancer, error) }
func NewAzureMetadataClient ¶
func NewAzureMetadataClient(opts ...MetadataGetterOption) AzureMetadata
type AzureMetadataAdditionalCapabilities ¶
type AzureMetadataAdditionalCapabilities struct {
HibernationEnabled string `json:"hibernationEnabled,omitempty"`
}
type AzureMetadataCompute ¶
type AzureMetadataCompute struct { AzEnvironment string `json:"azEnvironment,omitempty"` AdditionalCapabilities AzureMetadataAdditionalCapabilities `json:"additionalCapabilities,omitempty"` CustomData string `json:"customData,omitempty"` EvictionPolicy string `json:"evictionPolicy,omitempty"` ExtendedLocation AzureMetadataExtendedLocation `json:"extendedLocation,omitempty"` Host AzureMetadataHost `json:"host,omitempty"` HostGroup AzureMetadataHostGroup `json:"hostGroup,omitempty"` IsHostCompatibilityLayerVM string `json:"isHostCompatibilityLayerVm,omitempty"` LicenseType string `json:"licenseType,omitempty"` Location string `json:"location,omitempty"` Name string `json:"name,omitempty"` Offer string `json:"offer,omitempty"` OSProfile AzureMetadataOSProfile `json:"osProfile,omitempty"` OsType string `json:"osType,omitempty"` PlacementGroupID string `json:"placementGroupId,omitempty"` Plan AzureMetadataPlan `json:"plan,omitempty"` PlatformUpdateDomain string `json:"platformUpdateDomain,omitempty"` PlatformFaultDomain string `json:"platformFaultDomain,omitempty"` PlatformSubFaultDomain string `json:"platformSubFaultDomain,omitempty"` Priority string `json:"priority,omitempty"` Provider string `json:"provider,omitempty"` PublicKeys []AzureMetadataPublicKey `json:"publicKeys,omitempty"` Publisher string `json:"publisher,omitempty"` ResourceGroupName string `json:"resourceGroupName,omitempty"` ResourceID string `json:"resourceId,omitempty"` Sku string `json:"sku,omitempty"` SecurityProfile AzureMetadataSecurityProfile `json:"securityProfile,omitempty"` SubscriptionID string `json:"subscriptionId,omitempty"` Tags string `json:"tags,omitempty"` TagsList []AzureMetadataTag `json:"tagsList,omitempty"` UserData []byte `json:"userData,omitempty"` VirtualMachineScaleSet AzureMetadataVirtualMachineScaleSet `json:"virtualMachineScaleSet,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"` }
type AzureMetadataHost ¶
type AzureMetadataHost struct {
ID string `json:"id,omitempty"`
}
type AzureMetadataHostGroup ¶
type AzureMetadataHostGroup struct {
ID string `json:"id,omitempty"`
}
type AzureMetadataIPAddress ¶
type AzureMetadataIPv4 ¶
type AzureMetadataIPv4 struct { IPAddress []AzureMetadataIPAddress `json:"ipAddress,omitempty"` Subnet []AzureMetadataSubnet `json:"subnet,omitempty"` }
type AzureMetadataIPv6 ¶
type AzureMetadataIPv6 struct {
IPAddress []AzureMetadataIPAddress `json:"ipAddress,omitempty"`
}
type AzureMetadataInstance ¶
type AzureMetadataInstance struct { Compute AzureMetadataCompute `json:"compute,omitempty"` Network AzureMetadataNetwork `json:"network,omitempty"` }
type AzureMetadataLB ¶
type AzureMetadataLB struct {
PublicIPAddresses []AzureMetadataLoadBalancerPublicIPAddress `json:"publicIPAddresses,omitempty"`
}
type AzureMetadataLoadBalancer ¶
type AzureMetadataLoadBalancer struct {
LoadBalancer AzureMetadataLB `json:"loadbalancer,omitempty"`
}
type AzureMetadataNetwork ¶
type AzureMetadataNetwork struct {
Interface []AzureMetadataNetworkInterface `json:"interface,omitempty"`
}
type AzureMetadataNetworkInterface ¶
type AzureMetadataNetworkInterface struct { IPv4 AzureMetadataIPv4 `json:"iPv4,omitempty"` IPv6 AzureMetadataIPv6 `json:"iPv6,omitempty"` MacAddress string `json:"macAddress,omitempty"` }
type AzureMetadataOSProfile ¶
type AzureMetadataPlan ¶
type AzureMetadataPublicKey ¶
type AzureMetadataSubnet ¶
type AzureMetadataTag ¶
type AzureMetadataVirtualMachineScaleSet ¶
type AzureMetadataVirtualMachineScaleSet struct {
ID string `json:"id,omitempty"`
}
type CollectorOption ¶
type CollectorOption func(*collector)
func CollectorWithForceOnAzure ¶
func CollectorWithForceOnAzure() CollectorOption
func CollectorWithGetAzureMetadataFunc ¶
func CollectorWithGetAzureMetadataFunc(fn GetAzureMetadataFunc) CollectorOption
func CollectorWithMetadataContainerInitFunc ¶
func CollectorWithMetadataContainerInitFunc(fn func() metadatax.MetadataContainer) CollectorOption
type GetAzureMetadataFunc ¶
type GetAzureMetadataFunc func(ctx context.Context) AzureMetadata
type MetadataGetterOption ¶
type MetadataGetterOption func(*metadataGetter)
func AzureMetadataGetterWithHTTPClient ¶
func AzureMetadataGetterWithHTTPClient(httpClient metadatax.HTTPClient) MetadataGetterOption
func AzureMetadataGetterWithVersion ¶
func AzureMetadataGetterWithVersion(version string) MetadataGetterOption
Click to show internal directories.
Click to hide internal directories.