Documentation ¶
Overview ¶
Package containerd handles port binding events from containerd API
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventMonitor ¶
type EventMonitor struct {
// contains filtered or unexported fields
}
EventMonitor monitors the Containerd API for container events.
func NewEventMonitor ¶
func NewEventMonitor( containerdSock string, portTracker tracker.Tracker, ) (*EventMonitor, error)
NewEventMonitor creates and returns a new Event Monitor for Containerd API. Caller is responsible to make sure that Docker engine is up and running.
func (*EventMonitor) Close ¶
func (e *EventMonitor) Close() error
Close closes the client connection to the API server.
func (*EventMonitor) IsServing ¶
func (e *EventMonitor) IsServing(ctx context.Context) error
IsServing returns true if the client can successfully connect to the containerd daemon and the healthcheck service returns the SERVING response. This call will block if a transient error is encountered during connection. A timeout can be set in the context to ensure it returns early.
func (*EventMonitor) MonitorPorts ¶
func (e *EventMonitor) MonitorPorts(ctx context.Context)
MonitorPorts subscribes to event API for container Create/Update/Delete events.