bonny v0.3.2 Bonny.Watcher.Impl
Implementation logic for Bonny.Watcher
Link to this section Summary
Functions
Dispatches an ADDED
, MODIFIED
, and DELETED
events to an controller
Gets the resource version from the state, or fetches it from Kubernetes API if not present
Initialize a Bonny.Watcher
state
Watches a CRD resource for ADDED
, MODIFIED
, and DELETED
events from the Kubernetes API.
Link to this section Types
Link to this type
t()
t()
t() :: %Bonny.Watcher.Impl{
buffer: Bonny.Watcher.ResponseBuffer.t(),
controller: atom(),
resource_version: String.t() | nil,
spec: Bonny.CRD.t()
}
t() :: %Bonny.Watcher.Impl{ buffer: Bonny.Watcher.ResponseBuffer.t(), controller: atom(), resource_version: String.t() | nil, spec: Bonny.CRD.t() }
Link to this section Functions
Link to this function
dispatch(map, controller)
Dispatches an ADDED
, MODIFIED
, and DELETED
events to an controller
Link to this function
extract_rv(map)
Link to this function
get_resource_version(state)
get_resource_version(state)
get_resource_version(Bonny.Watcher.Impl.t()) :: binary()
get_resource_version(Bonny.Watcher.Impl.t()) :: binary()
Gets the resource version from the state, or fetches it from Kubernetes API if not present
Link to this function
new(controller)
new(controller)
new(module()) :: Bonny.Watcher.Impl.t()
new(module()) :: Bonny.Watcher.Impl.t()
Initialize a Bonny.Watcher
state
Link to this function
process_line(line, current_rv, state)
Link to this function
process_lines(state, lines)
Link to this function
watch_for_changes(state, watcher)
watch_for_changes(state, watcher)
watch_for_changes(Bonny.Watcher.Impl.t(), pid()) :: no_return()
watch_for_changes(Bonny.Watcher.Impl.t(), pid()) :: no_return()
Watches a CRD resource for ADDED
, MODIFIED
, and DELETED
events from the Kubernetes API.
Streams HTTPoison response to Bonny.Watcher