Documentation ¶
Overview ¶
Package discover provides functions to get metadata for different cloud environments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Providers = map[string]Provider{ "aliyun": &aliyun.Provider{}, "aws": &aws.Provider{}, "azure": &azure.Provider{}, "digitalocean": &digitalocean.Provider{}, "gce": &gce.Provider{}, "hcloud": &hcloud.Provider{}, "linode": &linode.Provider{}, "mdns": &mdns.Provider{}, "os": &os.Provider{}, "scaleway": &scaleway.Provider{}, "softlayer": &softlayer.Provider{}, "tencentcloud": &tencentcloud.Provider{}, "triton": &triton.Provider{}, "vsphere": &vsphere.Provider{}, "packet": &packet.Provider{}, }
Providers contains all available providers.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config stores key/value pairs for the discovery functions to use.
type Discover ¶
type Discover struct { // Providers is the list of address lookup providers. // If nil, the default list of providers is used. Providers map[string]Provider // contains filtered or unexported fields }
Discover looks up metadata in different cloud environments.
func (*Discover) Addrs ¶
Addrs discovers ip addresses of nodes that match the given filter criteria. The config string must have the format 'provider=xxx key=val key=val ...' where the keys and values are provider specific. The values are URL encoded.
type Option ¶
Option is used as an initialization option/
func WithProviders ¶
WithProviders allows specifying your own set of providers.
func WithUserAgent ¶
WithUserAgent allows specifying a custom user agent option to send with requests when the underlying client library supports it.
type Provider ¶
type Provider interface { // Addrs looks up addresses in the cloud environment according to the // configuration provided in args. Addrs(args map[string]string, l *log.Logger) ([]string, error) // Help provides the configuration help for the command line client. Help() string }
Provider has lookup functions for meta data in a cloud environment.
type ProviderWithUserAgent ¶
type ProviderWithUserAgent interface { // SetUserAgent sets the user agent on the provider to the provided string. SetUserAgent(s string) }
ProviderWithUserAgent is a provider that declares it's user agent. Not all providers support this.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
discover
discover provides node discovery on the command line.
|
discover provides node discovery on the command line. |
provider
|
|
aliyun
Package aliyun provides node discovery for Aliyun.
|
Package aliyun provides node discovery for Aliyun. |
aws
Package aws provides node discovery for Amazon AWS.
|
Package aws provides node discovery for Amazon AWS. |
azure
Package azure provides node discovery for Microsoft Azure.
|
Package azure provides node discovery for Microsoft Azure. |
digitalocean
Package digitalocean provides node discovery for DigitalOcean.
|
Package digitalocean provides node discovery for DigitalOcean. |
gce
Package gce provides node discovery for Google Cloud.
|
Package gce provides node discovery for Google Cloud. |
hcloud
Package hcloud provides node discovery for Hetzner Cloud.
|
Package hcloud provides node discovery for Hetzner Cloud. |
k8s
Package k8s provides pod discovery for Kubernetes.
|
Package k8s provides pod discovery for Kubernetes. |
linode
Package linode provides node discovery for Linode.
|
Package linode provides node discovery for Linode. |
mdns
Package mdns provides node discovery via mDNS.
|
Package mdns provides node discovery via mDNS. |
os
Package os provides node discovery for Openstack.
|
Package os provides node discovery for Openstack. |
scaleway
Package scaleway provides node discovery for Scaleway.
|
Package scaleway provides node discovery for Scaleway. |
softlayer
Package softlayer provides node discovery for Softlayer.
|
Package softlayer provides node discovery for Softlayer. |
tencentcloud
Package tencentcloud provides node discovery for TencentCloud.
|
Package tencentcloud provides node discovery for TencentCloud. |
triton
Package aws provides node discovery for Joyent Triton.
|
Package aws provides node discovery for Joyent Triton. |
vsphere
Package vsphere provides node discovery for VMware vSphere.
|
Package vsphere provides node discovery for VMware vSphere. |