View Source Bonny.Server.Watcher (bonny v0.5.1)
Creates the stream for watching resources in kubernetes and prepares its processing.
Watching a resource in kubernetes results in a stream of add/modify/delete events.
This module uses K8s.Client.watch_and_stream/3
to create such a stream and maps
events to a controller's event handler. It is then up to the caller to run the
resulting stream.
example
Example
watch_stream = Bonny.Server.Watcher.get_stream(controller)
Task.async(fn -> Stream.run(watch_stream) end)
Link to this section Summary
Link to this section Functions
@spec get_stream(module(), K8s.Conn.t(), K8s.Operation.t()) :: Enumerable.t()