View Source Bonny.Server.Reconciler behaviour (bonny v1.4.0)

Creates a stream that, when run, streams a list of resources and calls reconcile/1 on the given controller for each resource in the stream in parallel.

Example

reconciliation_stream = Bonny.Server.Reconciler.get_stream(controller)
Task.async(fn -> Stream.run(reconciliation_stream) end)

Summary

Functions

Prepares a stream wich maps each resoruce returned by the reconcile_operation to a function reconcile/1 on the given module. If given, the stream_opts are passed to K8s.Client.stream/3

Callbacks

@callback reconcile(map()) :: :ok | {:ok, any()} | {:error, any()}

Functions

Link to this function

get_raw_stream(conn, reconcile_operation, stream_opts \\ [])

View Source
@spec get_raw_stream(K8s.Conn.t(), K8s.Operation.t(), keyword()) :: Enumerable.t()
Link to this function

get_stream(module, conn, reconcile_operation, stream_opts \\ [])

View Source

Prepares a stream wich maps each resoruce returned by the reconcile_operation to a function reconcile/1 on the given module. If given, the stream_opts are passed to K8s.Client.stream/3