View Source K8s.Client.DynamicHTTPProvider (k8s v2.5.0)

Allows for registration of K8s.Client.Provider handlers per-process.

Used internally by the test suite for testing/mocking Kubernetes responses.

Summary

Functions

Returns a specification to start this module under a supervisor.

List all registered handlers

Locate the handler module for this process or any ancestor

Register the handler mdoule for this process

Dispatch request/5 to the module registered in the current process or any ancestor.

Starts this provider.

Dispatch stream_to/6 to the module registered in the current process or any ancestor.

Dispatch stream_to/6 to the module registered in the current process or any ancestor.

Dispatch request/5 to the module registered in the current process or any ancestor.

Dispatch request/5 to the module registered in the current process or any ancestor.

Dispatch request/5 to the module registered in the current process or any ancestor.

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec list() :: map()

List all registered handlers

@spec locate(pid()) :: module() | function() | nil

Locate the handler module for this process or any ancestor

Link to this function

register(this_pid, module_or_function)

View Source
@spec register(pid(), module() | function()) :: map()

Register the handler mdoule for this process

Link to this function

request(method, url, body, headers, opts)

View Source

Dispatch request/5 to the module registered in the current process or any ancestor.

@spec start_link(any()) :: GenServer.on_start()

Starts this provider.

Link to this function

stream(method, url, body, headers, opts)

View Source

Dispatch stream_to/6 to the module registered in the current process or any ancestor.

Link to this function

stream_to(method, url, body, headers, opts, stream_to)

View Source

Dispatch stream_to/6 to the module registered in the current process or any ancestor.

Link to this function

websocket_request(url, headers, opts)

View Source

Dispatch request/5 to the module registered in the current process or any ancestor.

Link to this function

websocket_stream(url, headers, opts)

View Source

Dispatch request/5 to the module registered in the current process or any ancestor.

Link to this function

websocket_stream_to(url, headers, opts, stream_to)

View Source

Dispatch request/5 to the module registered in the current process or any ancestor.