Documentation
¶
Index ¶
- func NodeHasHealthyEndpoint(eps *v1.Endpoints, node string) bool
- type Client
- func (c *Client) Errorf(svc *v1.Service, kind, msg string, args ...interface{})
- func (c *Client) HandleConfig(namespace, configMap string, handler func(*config.Config) error)
- func (c *Client) HandleLeadership(nodeName string, handler func(bool))
- func (c *Client) HandleNode(nodeName string, handler func(*v1.Node) error)
- func (c *Client) HandleService(handler func(string, *v1.Service) error)
- func (c *Client) HandleServiceAndEndpoints(handler func(string, *v1.Service, *v1.Endpoints) error)
- func (c *Client) HandleSynced(handler func())
- func (c *Client) Infof(svc *v1.Service, kind, msg string, args ...interface{})
- func (c *Client) Run(httpPort int) error
- func (c *Client) Update(svc *v1.Service) (*v1.Service, error)
- func (c *Client) UpdateStatus(svc *v1.Service) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) HandleConfig ¶ added in v0.4.0
HandleConfig registers a handler for changes to MetalLB's configuration.
func (*Client) HandleLeadership ¶ added in v0.4.0
HandleLeadership starts a leader election and notifies handler of changes to leadership state.
func (*Client) HandleNode ¶ added in v0.4.0
HandleNode registers a handler for changes to the given Node.
func (*Client) HandleService ¶ added in v0.4.0
HandleService registers a handler for changes to Service objects.
func (*Client) HandleServiceAndEndpoints ¶ added in v0.4.0
HandleServiceAndEndpoints registers a handler for changes to Service objects and their associated Endpoints.
func (*Client) HandleSynced ¶ added in v0.4.0
func (c *Client) HandleSynced(handler func())
HandleSynced registers a handler for the "local cache synced" signal.
func (*Client) Run ¶
Run watches for events on the Kubernetes cluster, and dispatches calls to the Controller.