k8s v0.5.2 K8s.Client.Provider behaviour

HTTP Request / Response provider behaviour

Link to this section Summary

Callbacks

Handle HTTP Responses

Generate headers for HTTP Requests

Link to this section Types

Link to this type

error_t()

error_t() :: {:error, atom() | HTTPoison.Response.t() | HTTPoison.Error.t()}
Link to this type

response_t()

response_t() :: success_t() | error_t()
Link to this type

success_t()

success_t() :: {:ok, [map()] | map() | reference() | binary() | [binary()]}

Link to this section Callbacks

Link to this callback

handle_response(arg1)

handle_response(
  {:ok, HTTPoison.Response.t() | HTTPoison.AsyncResponse.t()}
  | {:error, HTTPoison.Error.t()}
) :: response_t()

Handle HTTP Responses

Link to this callback

headers(atom, arg2)

headers(atom(), K8s.Conn.RequestOptions.t()) :: [{binary(), binary()}]

Generate headers for HTTP Requests

Link to this callback

request(atom, binary, binary, keyword, keyword)

request(atom(), binary(), binary(), keyword(), keyword()) :: response_t()

Perform HTTP Requests