View Source kuberlnetes (kuberlnetes v0.1.0)
Link to this section Summary
Functions
Deletes the given resource
Loads the current-context from ~/.kube/config
Initiates a GET request against the configured kubernetes api server or raises an error if the server is not configured correctly.
Configures a server using the service account
Returns the current datetime in the kubernetes MicroTime format see: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#microtime-v1-meta
Initiates a PATCH request against the configured kubernetes api server or raises an error if the server is not configured correctly. see: server()
Initiates a POST request against the configured kubernetes api server or raises an error if the server is not configured correctly. see: server()
Closes an active watch process when not running in a supervision tree.
Returns all currently active watch processes
Link to this section Types
-type http_status_err() :: 300..600.
-type kube_cfg_options() :: #{path => string(), context => string(), cache => boolean()}.
-type maybe(T) :: T | undefined.
-type mutation_request() :: #{path => string(), body => map() | binary()}.
-type options() :: #{server => server() | undefined}.
-type resp_with_body() :: {ok, map()} | {error, http_status_err()}.
-type server() :: #server{}.
Link to this section Functions
-spec delete(Path, Opts) -> {ok, Body} when Path :: string(), Opts :: options(), Body :: map().
-spec from_config(Options) -> server() when Options :: kube_cfg_options().
-spec from_raw(string()) -> server().
-spec get(Path) -> {ok, Body} when Path :: string(), Body :: map().
-spec get(Path, Opts) -> {ok, Body} when Path :: string(), Opts :: options(), Body :: map().
-spec in_cluster() -> server().
-spec microtime_now() -> binary().
-spec patch(Request, Opts) -> {ok, Body} when Request :: mutation_request(), Opts :: options(), Body :: map().
-spec post(Request, Opts) -> {ok, Body} when Request :: mutation_request(), Opts :: options(), Body :: map().
-spec watch(Opts) -> Result when Opts :: kuberlnetes_watch:watch_opts(), Result :: {ok, pid()}.
-spec watch_close(Pid) -> Result when Pid :: pid(), Result :: ok.
-spec watches() -> Result when Result :: [pid()].