k8s v0.3.1 K8s.Client.Runner.Stream
Takes a K8s.Client.list/3
operation and returns an Elixir Stream
Link to this section Summary
Link to this section Types
Link to this type
halt_t()
halt_t()
halt_t() :: {:halt, state_t()}
halt_t() :: {:halt, state_t()}
Halt streaming
Link to this type
state_t()
state_t()
state_t() :: {list(), K8s.Client.Runner.Stream.ListRequest.t()}
state_t() :: {list(), K8s.Client.Runner.Stream.ListRequest.t()}
List of items and pagination request
Link to this section Functions
Link to this function
run(operation, cluster, opts \\ [])
run(operation, cluster, opts \\ [])
run(K8s.Operation.t(), atom(), keyword()) ::
{:ok, Enumerable.t()} | {:error, atom()}
run(K8s.Operation.t(), atom(), keyword()) :: {:ok, Enumerable.t()} | {:error, atom()}
Validates operation type before calling stream/3
. Only supports verbs: list_all_namespaces
and list
.
Link to this function
stream(op, cluster, opts \\ [])
stream(op, cluster, opts \\ [])
stream(K8s.Operation.t(), atom(), keyword() | nil) :: Enumerable.t()
stream(K8s.Operation.t(), atom(), keyword() | nil) :: Enumerable.t()
Returns an elixir stream of paginated list results.
Elements in stream will be HTTP bodies, or error tuples.
Encountering an HTTP error mid-stream will halt the stream.