Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSDConfig = SDConfig{ Port: 80, RefreshInterval: model.Duration(60 * time.Second), Availability: "public", }
DefaultSDConfig is the default OpenStack SD configuration.
Functions ¶
Types ¶
type HypervisorDiscovery ¶ added in v1.8.0
type HypervisorDiscovery struct {
// contains filtered or unexported fields
}
HypervisorDiscovery discovers OpenStack hypervisors.
type InstanceDiscovery ¶ added in v1.8.0
type InstanceDiscovery struct {
// contains filtered or unexported fields
}
InstanceDiscovery discovers OpenStack instances.
type Role ¶ added in v1.29.3
type Role string
Role is the role of the target in OpenStack.
const ( // OpenStack document reference // https://docs.openstack.org/nova/pike/admin/arch.html#hypervisors OpenStackRoleHypervisor Role = "hypervisor" // OpenStack document reference // https://docs.openstack.org/horizon/pike/user/launch-instances.html OpenStackRoleInstance Role = "instance" )
The valid options for OpenStackRole.
func (*Role) UnmarshalYAML ¶ added in v1.29.3
UnmarshalYAML implements the yaml.Unmarshaler interface.
type SDConfig ¶ added in v1.29.3
type SDConfig struct { IdentityEndpoint string `yaml:"identity_endpoint"` Username string `yaml:"username"` UserID string `yaml:"userid"` Password config.Secret `yaml:"password"` ProjectName string `yaml:"project_name"` ProjectID string `yaml:"project_id"` DomainName string `yaml:"domain_name"` DomainID string `yaml:"domain_id"` ApplicationCredentialName string `yaml:"application_credential_name"` ApplicationCredentialID string `yaml:"application_credential_id"` ApplicationCredentialSecret config.Secret `yaml:"application_credential_secret"` Role Role `yaml:"role"` Region string `yaml:"region"` RefreshInterval model.Duration `yaml:"refresh_interval"` Port int `yaml:"port"` AllTenants bool `yaml:"all_tenants,omitempty"` TLSConfig config.TLSConfig `yaml:"tls_config,omitempty"` Availability string `yaml:"availability,omitempty"` }
SDConfig is the configuration for OpenStack based service discovery.
func (*SDConfig) NewDiscoverer ¶ added in v1.29.3
func (c *SDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
NewDiscoverer returns a Discoverer for the Config.
func (*SDConfig) SetDirectory ¶ added in v1.29.3
SetDirectory joins any relative file paths with dir.
func (*SDConfig) UnmarshalYAML ¶ added in v1.29.3
UnmarshalYAML implements the yaml.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.