Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultEndpoint = "http://metadata.google.internal"
DefaultEndpoint is the DNS name for the default GCP compute instance metadata service.
Functions ¶
This section is empty.
Types ¶
type ClientOptions ¶
ClientOptions contains various user-specifiable options for a MetaClient.
func GetClientOptions ¶
func GetClientOptions() ClientOptions
GetClientOptions - Centralised reading of GCP_TIMEOUT ... but cannot use in vault/auth.go as different strconv.Atoi error handling
type MetaClient ¶
type MetaClient struct {
// contains filtered or unexported fields
}
MetaClient is used to access metadata accessible via the GCP compute instance metadata service version 1.
func NewMetaClient ¶
func NewMetaClient(options ClientOptions) *MetaClient
NewMetaClient constructs a new MetaClient with the given ClientOptions. If the environment contains a variable named `GCP_META_ENDPOINT`, the client will address that, if not the value of `DefaultEndpoint` is used.
Click to show internal directories.
Click to hide internal directories.