Documentation ¶
Index ¶
- type Client
- func (c *Client) Errorf(svc *v1.Service, kind, msg string, args ...interface{})
- func (c *Client) ForceSync()
- func (c *Client) GetPodsIPs(namespace, labels string) ([]string, error)
- func (c *Client) Infof(svc *v1.Service, kind, msg string, args ...interface{})
- func (c *Client) Run(stopCh <-chan struct{}) error
- func (c *Client) Update(svc *v1.Service) (*v1.Service, error)
- func (c *Client) UpdateStatus(svc *v1.Service) error
- type Config
- type SyncState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client watches a Kubernetes cluster and translates events into Controller method calls.
func New ¶ added in v0.4.0
New connects to masterAddr, using kubeconfig to authenticate.
The client uses processName to identify itself to the cluster (e.g. when logging events).
func (*Client) ForceSync ¶ added in v0.9.0
func (c *Client) ForceSync()
ForceSync reprocess all watched services
func (*Client) GetPodsIPs ¶ added in v0.9.0
GetPodsIPs get the IPs from all the pods matched by the labels string
func (*Client) Run ¶
Run watches for events on the Kubernetes cluster, and dispatches calls to the Controller.
type Config ¶ added in v0.6.0
type Config struct { ProcessName string ConfigMapName string NodeName string MetricsHost string MetricsPort int ReadEndpoints bool Logger log.Logger ServiceChanged func(log.Logger, string, *v1.Service, *v1.Endpoints) SyncState ConfigChanged func(log.Logger, *config.Config) SyncState NodeChanged func(log.Logger, *v1.Node) SyncState Synced func(log.Logger) }
Config specifies the configuration of the Kubernetes client/watcher.
Click to show internal directories.
Click to hide internal directories.