Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PublicCloudProviders contains the details we use to check which one // we are on. PublicCloudProviders = Providers{ "gke": Provider{ Path: "/", Header: map[string]string{"Server": "Metadata Server for VM"}, ExpectedStatusCode: http.StatusOK, }, "do": Provider{ Path: "/metadata/v1/id", Header: map[string]string{"Content-Type": "text/plain; charset=utf-8"}, ExpectedStatusCode: http.StatusOK, }, "eks": Provider{ Path: "/", Header: map[string]string{"Server": "EC2ws"}, ExpectedStatusCode: http.StatusUnauthorized, }, } )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps http.Client so we can mock
func (*Client) GetProvider ¶
GetProvider attempts to calculate the public cloud provider we are running on
Click to show internal directories.
Click to hide internal directories.