k8s v0.3.1 K8s.Client.Runner.Watch
K8s.Client
runner that will watch a resource or resources and stream results back to a process.
Link to this section Summary
Functions
Watch a resource or list of resources. Provide the stream_to
option or results will be stream to self()
.
Watch a resource or list of resources from a specific resource version. Provide the stream_to
option or results will be stream to self()
.
Link to this section Functions
Link to this function
run(operation, cluster_name, opts)
run(operation, cluster_name, opts)
run(K8s.Operation.t(), atom(), keyword(atom())) ::
K8s.Client.Runner.Base.result_t()
run(K8s.Operation.t(), atom(), keyword(atom())) :: K8s.Client.Runner.Base.result_t()
Watch a resource or list of resources. Provide the stream_to
option or results will be stream to self()
.
Note: Current resource version will be looked up automatically.
Examples
operation = K8s.Client.list("v1", "Namespace")
{:ok, reference} = Watch.run(operation, :test, stream_to: self())
operation = K8s.Client.get("v1", "Namespace", [name: "test"])
{:ok, reference} = Watch.run(operation, :test, stream_to: self())
Link to this function
run(operation, cluster_name, rv, opts)
run(operation, cluster_name, rv, opts)
run(K8s.Operation.t(), atom(), binary(), keyword(atom())) ::
K8s.Client.Runner.Base.result_t()
run(K8s.Operation.t(), atom(), binary(), keyword(atom())) :: K8s.Client.Runner.Base.result_t()
Watch a resource or list of resources from a specific resource version. Provide the stream_to
option or results will be stream to self()
.
Examples
operation = K8s.Client.list("v1", "Namespace")
resource_version = 3003
{:ok, reference} = Watch.run(operation, :test, resource_version, stream_to: self())
operation = K8s.Client.get("v1", "Namespace", [name: "test"])
resource_version = 3003
{:ok, reference} = Watch.run(operation, :test, resource_version, stream_to: self())