raxx v0.17.6 Raxx.Context
It is designed to be flexible and to enable different middlewares to operate on it without conflicts. Each separate functionality using the context can be in a different “section”, containing arbitrary data.
Context is implicitly shared using the process dictionary and persists for the
duration of a single request/response cycle. If you want to pass the context
to a different process, you need to take its snapshot, pass it explicitly and
“restore” it in the other process. See
Raxx.Context.restore_snapshot/1 for details.
Link to this section Summary
Deletes the section from the context
Creates a snapshot of the current process’ context
Restores a previously created context snapshot
Retrieves the value of the context section
Sets the value of a context section
Link to this section Types
Link to this section Functions
Deletes the section from the context.
Returns the previous value of the section or
nil if one was
Creates a snapshot of the current process’ context.
The returned context data can be passed between processes and restored
Restores a previously created context snapshot.
It will restore the implicit state of the context for the current
process to what it was when the snapshot was created using
Raxx.Context.get_snapshot/0. The current context values won’t
be persisted in any way.
Retrieves the value of the context section.
If the section wasn’t set yet, it will return