package kube

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Client.ForSource

Typed operations for one resource descriptor. Object operations default to the explicit namespace, then kubeconfig namespace, then default. A namespace-less LIST or WATCH continues to mean all namespaces.

Parameters

Signature

Sourceval get : ?cancel:Cancel.t -> ?resource_version:Core.Resource_version.t -> ?resource_version_match:[ `Exact | `Not_older_than ] -> t -> ?namespace:string -> string -> (Resource.t, error) result
Sourceval create : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> Resource.t -> (Resource.t, error) result
Sourceval replace : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> string -> Resource.t -> (Resource.t, error) result
Sourceval delete : ?cancel:Cancel.t -> ?options:delete_options -> t -> ?namespace:string -> string -> (unit, error) result
Sourceval delete_collection : ?cancel:Cancel.t -> ?options:delete_options -> ?namespace:string -> ?all_namespaces:bool -> ?label_selector:string -> ?field_selector:string -> ?resource_version:Core.Resource_version.t -> ?resource_version_match:[ `Exact | `Not_older_than ] -> ?limit:int -> ?continue:string -> ?timeout_seconds:int -> t -> (unit, error) result

Delete every object selected by Kubernetes ListOptions. The delete_options body controls preconditions, propagation, grace period, and dry-run behavior. Namespaced resources default to the configured or default namespace; all_namespaces=true is an explicit opt-in to the cross-namespace collection endpoint.

Sourceval patch : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> string -> patch -> (Resource.t, error) result
Sourceval patch_status : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> string -> patch -> (Resource.t, error) result
Sourceval replace_status : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> string -> Resource.t -> (Resource.t, error) result
Sourceval get_subresource : ?cancel:Cancel.t -> t -> ?namespace:string -> string -> string -> (Yojson.Safe.t, error) result
Sourceval create_subresource : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> name:string -> subresource:string -> Yojson.Safe.t -> (Yojson.Safe.t, error) result
Sourceval replace_subresource : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> name:string -> subresource:string -> Yojson.Safe.t -> (Yojson.Safe.t, error) result
Sourceval patch_subresource : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> name:string -> subresource:string -> patch -> (Yojson.Safe.t, error) result
Sourceval delete_subresource : ?cancel:Cancel.t -> ?options:delete_options -> t -> ?namespace:string -> string -> string -> (unit, error) result
Sourceval stream_subresource : ?cancel:Cancel.t -> ?query:(string * string) list -> ?max_error_body_bytes:int -> t -> ?namespace:string -> string -> string -> on_chunk:(string -> unit) -> (unit, error) result

Stream an arbitrary successful subresource body without buffering it. Chunks have transport boundaries and are not necessarily complete lines. Error responses remain bounded by max_error_body_bytes.

Sourceval get_scale : ?cancel:Cancel.t -> t -> ?namespace:string -> string -> (scale, error) result
Sourceval replace_scale : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> string -> scale -> (scale, error) result
Sourceval patch_scale : ?cancel:Cancel.t -> ?options:write_options -> t -> ?namespace:string -> string -> patch -> (scale, error) result
Sourceval logs : ?cancel:Cancel.t -> ?options:log_options -> ?max_body_bytes:int -> t -> ?namespace:string -> string -> (string, error) result

Read a Pod log response into memory, bounded by max_body_bytes.

Sourceval stream_logs : ?cancel:Cancel.t -> ?options:log_options -> ?max_error_body_bytes:int -> t -> ?namespace:string -> string -> on_chunk:(string -> unit) -> (unit, error) result

Stream Pod logs. Set options.follow for a continuing stream and cancel the supplied token to stop it.

Sourceval list : ?cancel:Cancel.t -> ?namespace:string -> ?label_selector:string -> ?field_selector:string -> ?resource_version:Core.Resource_version.t -> ?resource_version_match:[ `Exact | `Not_older_than ] -> ?limit:int -> ?continue:string -> t -> (Resource.t list_result, error) result
Sourceval list_all : ?cancel:Cancel.t -> ?namespace:string -> ?label_selector:string -> ?field_selector:string -> ?resource_version:Core.Resource_version.t -> ?resource_version_match:[ `Exact | `Not_older_than ] -> ?page_size:int -> t -> (Resource.t list_result, error) result

Consume every continuation page from one consistent list snapshot. A failed continuation returns an error; callers must restart the whole list rather than combine inconsistent snapshots.

Sourceval watch : ?cancel:Cancel.t -> ?namespace:string -> ?label_selector:string -> ?field_selector:string -> ?timeout_seconds:int -> ?allow_bookmarks:bool -> ?resource_version_match:[ `Exact | `Not_older_than ] -> ?send_initial_events:bool -> ?max_event_bytes:int -> t -> resource_version:Core.Resource_version.t -> on_event:(Resource.t watch_event -> unit) -> (watch_outcome, error) result

Stream events from resource_version. A normal timeout/EOF returns the newest observed version. HTTP or in-band 410 is reported separately so a reflector can clear and rebuild its cache. Other in-band Status errors are delivered to on_event and returned as Api errors, allowing reconnect logic to apply backoff. Individual events are bounded by max_event_bytes.