Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerEventBus ¶
type DockerEventBus struct {
// contains filtered or unexported fields
}
DockerEventBus is an in-process fan-out point for Docker daemon events.
Publishers send the raw Docker event message once, and subscribers register by Docker event type. Consumers should treat messages as invalidation signals rather than authoritative state deltas; after receiving an event they should refetch the resource state they own.
func NewDockerEventBus ¶
func NewDockerEventBus() *DockerEventBus
NewDockerEventBus creates an empty Docker event bus.
func (*DockerEventBus) Publish ¶
func (b *DockerEventBus) Publish(msg events.Message)
Publish fans out msg to subscribers of msg.Type. Slow or full subscriber channels are skipped so Docker event consumption cannot be blocked by one listener.
func (*DockerEventBus) Subscribe ¶
func (b *DockerEventBus) Subscribe(eventType events.Type, ch chan<- events.Message) func()
Subscribe registers ch for messages of eventType and returns a cancellation function that removes the subscription. Delivery is non-blocking, so callers should use a buffered channel sized for their invalidation workload.