Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FuncMapWithName ¶
FuncMapWithName provides a tamplate.FuncMap.
func MustFuncMap ¶
MustFuncMap is similar to FuncMap, but panics if it cannot get ECS metadata.
Types ¶
type Object ¶
type Object struct {
Value interface{}
}
Object is ECS metadata object
func New ¶
New gets the ECS metadata. The acquisition method changes depending on the option. if return ECSMeta(nil), failed get ECS metadata
type Option ¶
type Option func(*setting)
Option provides a way to specify how to get the ECS metadata
func WithEnableV2 ¶
func WithEnableV2() Option
WithEnableV2 enables automatic detection of V2 endpoints.
func WithEndpoint ¶
WithEndpoint specifies the Endpoint to get ECS metadata.
func WithHTTPClient ¶
WithHTTPClient specifies the HTTP client used to download ECS Metadata.
func WithLogger ¶
WithLogger specifies the output method of Log
func WithRetryPolicy ¶
WithRetryPolicy specifies the retry policy when ECS metadata download fails.