Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostnameProvider ¶
type HostnameProvider interface { // Metadata gets host metadata from provider. Hostname(ctx context.Context) (string, error) }
HostnameProvider of a hostname from a given place.
func Chain ¶
func Chain(logger *zap.Logger, providers map[string]HostnameProvider, priorityList []string) (HostnameProvider, error)
Chain providers into a single provider that returns the first available hostname.
func Once ¶
func Once(provider HostnameProvider) HostnameProvider
Once wraps a provider to call it only once.
Click to show internal directories.
Click to hide internal directories.