Documentation ¶
Index ¶
- Variables
- func NewNodeLister(client kubernetes.Interface, options ...informers.SharedInformerOption) (listersv1.NodeLister, chan<- struct{})
- func NewServicesLister(client kubernetes.Interface, options ...informers.SharedInformerOption) (listersv1.ServiceLister, chan<- struct{})
- type EndpointsDiscoverer
- type EndpointsDiscovererWithTimeout
- type EndpointsDiscoveryConfig
- type MultiNamespacePodListerer
- type MultiNamespaceSecretListerer
- type PodListerer
- type PodListererConfig
- type SecretListerer
- type SecretListererConfig
Constants ¶
This section is empty.
Variables ¶
var ErrDiscoveryTimeout = errors.New("timeout discovering endpoints")
ErrDiscoveryTimeout is returned by EndpointsDiscovererWithTimeout when discovery times out
Functions ¶
func NewNodeLister ¶
func NewNodeLister(client kubernetes.Interface, options ...informers.SharedInformerOption) (listersv1.NodeLister, chan<- struct{})
NewNodeLister returns a NodeGetter to get nodes with informers.
func NewServicesLister ¶
func NewServicesLister(client kubernetes.Interface, options ...informers.SharedInformerOption) (listersv1.ServiceLister, chan<- struct{})
Types ¶
type EndpointsDiscoverer ¶
func NewEndpointsDiscoverer ¶
func NewEndpointsDiscoverer(config EndpointsDiscoveryConfig) (EndpointsDiscoverer, error)
type EndpointsDiscovererWithTimeout ¶
type EndpointsDiscovererWithTimeout struct { EndpointsDiscoverer BackoffDelay time.Duration Timeout time.Duration }
EndpointsDiscovererWithTimeout implements EndpointsDiscoverer with a retry mechanism if no endpoints are found.
func (*EndpointsDiscovererWithTimeout) Discover ¶
func (edt *EndpointsDiscovererWithTimeout) Discover() ([]string, error)
Discover will call poll the inner EndpointsDiscoverer every BackoffDelay seconds up to a max of Retries times until it returns an error, or a non-empty list of endpoints. If the max number of Retries is exceeded, it will return ErrDiscoveryTimeout.
type EndpointsDiscoveryConfig ¶
type EndpointsDiscoveryConfig struct { // LabelSelector is the selector used to filter Endpoints. LabelSelector string // Namespace can be used to restric the search to a particular namespace. Namespace string // If set, Port will discard all endpoints discovered that do not use this specified port Port int // Client is the Kubernetes client.Interface used to build informers. Client kubernetes.Interface }
type MultiNamespacePodListerer ¶
type MultiNamespacePodListerer struct {
// contains filtered or unexported fields
}
MultiNamespacePodListerer implements PodListerer interface for a group of listers pre-build on initialization.
func NewNamespacePodListerer ¶
func NewNamespacePodListerer(config PodListererConfig) (*MultiNamespacePodListerer, chan<- struct{})
NewNamespacePodListerer returns a MultiNamespacePodListerer with listers for all namespaces on config.Namespaces.
func (MultiNamespacePodListerer) Lister ¶
func (l MultiNamespacePodListerer) Lister(namespace string) (listersv1.PodNamespaceLister, bool)
Lister returns the available lister based on the namespace if exists in the listerer.
type MultiNamespaceSecretListerer ¶
type MultiNamespaceSecretListerer struct {
// contains filtered or unexported fields
}
MultiNamespaceSecretListerer implements SecretListerer interface for a group of listers pre-build on initialization.
func NewNamespaceSecretListerer ¶
func NewNamespaceSecretListerer(config SecretListererConfig) (*MultiNamespaceSecretListerer, chan<- struct{})
NewNamespaceSecretListerer returns a MultiNamespaceSecretListerer with listers for all namespaces on config.Namespaces.
func (MultiNamespaceSecretListerer) Lister ¶
func (l MultiNamespaceSecretListerer) Lister(namespace string) (listersv1.SecretNamespaceLister, bool)
Lister returns the available lister based on the namespace if exists in the listerer.
type PodListerer ¶
type PodListerer interface { // Lister ruturns the pod lister for the specified namespaces // and true if the lister exist in the listerer. Lister(namespace string) (listersv1.PodNamespaceLister, bool) }
PodListerer return namespaced pod listers.
type PodListererConfig ¶
type PodListererConfig struct { // Namespaces supported by the listerer. Namespaces []string // Client is the Kubernetes client.Interface used to build informers. Client kubernetes.Interface }
type SecretListerer ¶
type SecretListerer interface { // Lister ruturns the secret lister for the specified namespaces // and true if the lister exist in the listerer. Lister(namespace string) (listersv1.SecretNamespaceLister, bool) }
SecretListerer return namespaced secret listers.
type SecretListererConfig ¶
type SecretListererConfig struct { // Namespaces supported by the listerer. Namespaces []string // Client is the Kubernetes client.Interface used to build informers. Client kubernetes.Interface }