Documentation ¶
Index ¶
- func BuildTarget(client *ServerFinderConfig) (string, error)
- func RegisterAllGrpcResolvers()
- type BasicAuth
- type EndpointsAnalyzer
- type ExtraPort
- type GrpcResolver
- type HTTPClientConfig
- type KindAddressAnalyzer
- type KindCache
- type KubernetesConfig
- type PodAnalyzer
- type Secret
- type Selector
- type ServerFinderConfig
- type ServiceAnalyzer
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTarget ¶
func BuildTarget(client *ServerFinderConfig) (string, error)
func RegisterAllGrpcResolvers ¶
func RegisterAllGrpcResolvers()
Types ¶
type BasicAuth ¶
type BasicAuth struct { Username string `mapstructure:"username" yaml:"username"` Password Secret `mapstructure:"password" yaml:"password,omitempty"` PasswordFile string `mapstructure:"password_file" yaml:"password_file,omitempty"` }
BasicAuth contains basic HTTP authentication credentials.
type EndpointsAnalyzer ¶
type EndpointsAnalyzer struct { }
func (*EndpointsAnalyzer) GetAddresses ¶
func (p *EndpointsAnalyzer) GetAddresses(cache map[string]*targetgroup.Group, config *KubernetesConfig) []string
func (*EndpointsAnalyzer) KindType ¶
func (p *EndpointsAnalyzer) KindType() string
type GrpcResolver ¶
type HTTPClientConfig ¶
type HTTPClientConfig struct { // The HTTP basic authentication credentials for the targets. BasicAuth *BasicAuth `mapstructure:"basic_auth" yaml:"basic_auth,omitempty"` // The bearer token for the targets. BearerToken Secret `mapstructure:"bearer_token" yaml:"bearer_token,omitempty"` // The bearer token file for the targets. BearerTokenFile string `mapstructure:"bearer_token_file" yaml:"bearer_token_file,omitempty"` // HTTP proxy server to use to connect to the targets. ProxyURL string `mapstructure:"proxy_url" yaml:"proxy_url,omitempty"` // TLSConfig to use to connect to the targets. TLSConfig TLSConfig `mapstructure:"tls_config" yaml:"tls_config,omitempty"` }
HTTPClientConfig configures an HTTP client.
type KindAddressAnalyzer ¶
type KindAddressAnalyzer interface { KindType() string GetAddresses(cache map[string]*targetgroup.Group, config *KubernetesConfig) []string }
type KindCache ¶
type KindCache struct {
// contains filtered or unexported fields
}
func NewKindCache ¶
func NewKindCache(ctx context.Context, c *KubernetesConfig, cc resolver.ClientConn) (*KindCache, error)
func (*KindCache) UpdateAddresses ¶
type KubernetesConfig ¶
type KubernetesConfig struct { // The kubernetes API server address, If not define means using in kubernetes mode to connect APIServer string `mapstructure:"api_server"` // Connect to API Server Config HTTPClientConfig HTTPClientConfig `mapstructure:",squash" yaml:",inline"` // Support to lookup namespaces Namespaces []string `mapstructure:"namespaces"` // The kind of api Kind string `mapstructure:"kind"` // The kind selector Selector Selector `mapstructure:"selector"` // How to get the address exported port ExtraPort ExtraPort `mapstructure:"extra_port"` }
type PodAnalyzer ¶
type PodAnalyzer struct { }
func (*PodAnalyzer) GetAddresses ¶
func (p *PodAnalyzer) GetAddresses(cache map[string]*targetgroup.Group, config *KubernetesConfig) []string
func (*PodAnalyzer) KindType ¶
func (p *PodAnalyzer) KindType() string
type ServerFinderConfig ¶
type ServerFinderConfig struct { FinderType string `mapstructure:"finder_type"` // The gRPC server address finder type, support "static" and "kubernetes" // The gRPC server address, only works for "static" address finder ServerAddr string `mapstructure:"server_addr"` // The kubernetes config to lookup addresses, only works for "kubernetes" address finder KubernetesConfig *KubernetesConfig `mapstructure:"kubernetes_config"` }
type ServiceAnalyzer ¶
type ServiceAnalyzer struct { }
func (*ServiceAnalyzer) GetAddresses ¶
func (p *ServiceAnalyzer) GetAddresses(cache map[string]*targetgroup.Group, config *KubernetesConfig) []string
func (*ServiceAnalyzer) KindType ¶
func (p *ServiceAnalyzer) KindType() string
type TLSConfig ¶
type TLSConfig struct { // The CA cert to use for the targets. CAFile string `mapstructure:"ca_file" yaml:"ca_file,omitempty"` // The client cert file for the targets. CertFile string `mapstructure:"cert_file" yaml:"cert_file,omitempty"` // The client key file for the targets. KeyFile string `mapstructure:"key_file" yaml:"key_file,omitempty"` // Used to verify the hostname for the targets. ServerName string `mapstructure:"server_name" yaml:"server_name,omitempty"` // Disable target certificate validation. InsecureSkipVerify bool `mapstructure:"insecure_skip_verify" yaml:"insecure_skip_verify"` }
TLSConfig configures the options for TLS connections.
Click to show internal directories.
Click to hide internal directories.