Context struct that flows through an RPC plug pipeline.
Analogous to Plug.Conn, this struct carries all state through the
middleware pipeline:
config— the%WrapperConfig{}for this callfunction— the remote function atomargs— the list of arguments for the callnode— the target node (set by a NodeSelector plug)result— the raw RPC result (set by an Executor plug)error— an%EasyRpc.Error{}when the call failsassigns— a free-form map for plug authors to store metadatahalted— whentruethe pipeline stops and returns the contextattempt— current retry attempt number (0-based)
Summary
Functions
Puts a value into the assigns map.
Returns true if the context has an error set.
Halts the pipeline — the context is returned as-is and downstream plugs are skipped.
Creates a new context for an RPC call.
Types
@type t() :: %EasyRpc.Context{ args: list(), assigns: map(), attempt: non_neg_integer(), config: EasyRpc.WrapperConfig.t() | nil, error: EasyRpc.Error.t() | nil, function: atom(), halted: boolean(), node: node() | nil, result: term() | nil }
Functions
Puts a value into the assigns map.
Returns true if the context has an error set.
Halts the pipeline — the context is returned as-is and downstream plugs are skipped.
@spec new(EasyRpc.WrapperConfig.t(), atom(), list()) :: t()
Creates a new context for an RPC call.