SnakeBridge.RuntimeContext (SnakeBridge v0.15.0)

Copy Markdown View Source

Process-scoped runtime defaults for SnakeBridge calls.

Defaults are merged into __runtime__ options at call time, making it easy to set pool/timeout settings once per process or scoped block.

Summary

Functions

Clears runtime defaults for the current process.

Returns runtime defaults for the current process.

Sets runtime defaults for the current process.

Applies runtime defaults for the duration of the given function.

Types

defaults()

@type defaults() :: keyword()

Functions

clear_defaults()

@spec clear_defaults() :: :ok

Clears runtime defaults for the current process.

get_defaults()

@spec get_defaults() :: defaults()

Returns runtime defaults for the current process.

put_defaults(defaults)

@spec put_defaults(defaults() | nil) :: :ok

Sets runtime defaults for the current process.

with_runtime(opts, fun)

@spec with_runtime(defaults(), (-> result)) :: result when result: term()

Applies runtime defaults for the duration of the given function.