Module ot_ctx

This module defines the ot_ctx behaviour.
Required callback functions: set_value/4, get_value/3, get_value/4, remove/3, clear/2, set_current/3, get_current/2.

Data Types

context_manager()


context_manager() = {module(), term()}

ctx()


ctx() = map()

key()


key() = term()

namespace()


namespace() = term()

value()


value() = term()

Function Index

clear/1
get_current/1
get_value/2
get_value/3
http_extractor/2
http_extractor/3
http_extractor_fun/4
http_extractor_fun/5
http_injector/2
http_injector/3
http_injector_fun/4
http_injector_fun/5
remove/2
set_current/2
set_value/3

Function Details

clear/1


clear(Namespace::namespace()) -> ok

get_current/1


get_current(Namespace::namespace()) -> ctx()

get_value/2


get_value(Namespace::namespace(), Key::key()) -> value() | undefined

get_value/3


get_value(Namespace::namespace(), Key::key(), Default::value()) -> value()

http_extractor/2

http_extractor(Namespace, FromText) -> any()

http_extractor/3

http_extractor(Namespace, Key, FromText) -> any()

http_extractor_fun/4

http_extractor_fun(Headers, ContextManager, Namespace, FromText) -> any()

http_extractor_fun/5

http_extractor_fun(Headers, ContextManager, Namespace, Key, FromText) -> any()

http_injector/2

http_injector(Namespace, ToText) -> any()

http_injector/3

http_injector(Namespace, Key, ToText) -> any()

http_injector_fun/4

http_injector_fun(Headers, ContextManager, Namespace, ToText) -> any()

http_injector_fun/5

http_injector_fun(Headers, ContextManager, Namespace, Key, ToText) -> any()

remove/2


remove(Namespace::namespace(), Key::key()) -> ok

set_current/2


set_current(Namespace::namespace(), Ctx::ctx()) -> ok

set_value/3


set_value(Namespace::namespace(), Key::key(), Value::value()) -> ok