Documentation
¶
Overview ¶
Implements interaction with the Azure API.
Instance metadata is retrieved from the Azure IMDS API.
Retrieving metadata of other instances is done by using the Azure API, and requires Azure credentials.
Index ¶
- type Cloud
- func (c *Cloud) GetLoadBalancerEndpoint(ctx context.Context) (host, port string, retErr error)
- func (c *Cloud) InitSecretHash(ctx context.Context) ([]byte, error)
- func (c *Cloud) List(ctx context.Context) ([]metadata.InstanceMetadata, error)
- func (c *Cloud) PrepareControlPlaneNode(_ context.Context, _ *slog.Logger) error
- func (c *Cloud) Self(ctx context.Context) (metadata.InstanceMetadata, error)
- func (c *Cloud) UID(ctx context.Context) (string, error)
- type IMDSClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cloud ¶
type Cloud struct {
// contains filtered or unexported fields
}
Cloud provides Azure metadata and API access.
func New ¶
New initializes Cloud with the needed API clients. Default credentials are used for authentication.
func (*Cloud) GetLoadBalancerEndpoint ¶
GetLoadBalancerEndpoint retrieves the first load balancer IP from cloud provider metadata.
The returned string is an IP address without a port, but the method name needs to satisfy the metadata interface.
func (*Cloud) InitSecretHash ¶
InitSecretHash retrieves the InitSecretHash of the current instance.
func (*Cloud) PrepareControlPlaneNode ¶
PrepareControlPlaneNode is only supported on Linux.
type IMDSClient ¶
type IMDSClient struct {
// contains filtered or unexported fields
}
IMDSClient is a client for the Azure Instance Metadata Service.