Module gen_server_passage

gen_server wrapper module for providing tracing facility.

Copyright © 2017 Takeru Ohta <phjgt308@gmail.com>

Behaviours: gen_server.

Description

gen_server wrapper module for providing tracing facility.

The tracing facility is based on passage.

Data Types

server_name()

server_name() = {local, atom()} | {global, term()} | {via, module(), term()}

The name of a gen_server process.

See the documentation of gen_server module for more details.

server_ref()

server_ref() = pid() | atom() | {atom(), node()} | {global, term()} | {via, module(), term()}

A reference to a gen_server process.

See the documentation of gen_server module for more details.

start_option()

start_option() = {span, passage:maybe_span()} | {trace_process_lifecycle, passage:start_span_options()} | {inspect, boolean()} | (GenServerOptions::term())

GenServerOptions are options handled by the gen_server functions (e.g., gen_server:start_link/3).

start_options()

start_options() = [start_option()]

start_result()

start_result() = {ok, pid()} | ignore | {error, {already_started, pid()} | term()}

The result of a process startup.

See the documentation of gen_server module for more details.

Function Index

call/2Equivalent to Call(Name, Request, 5000).
call/3Traceable variant of gen_server:call/3.
cast/2Traceable variant of gen_server:cast/2.
process_span/0Returns the process scope span.
reply/2Equivalent to gen_server:reply / 2.
start/3Traceable variant of gen_server:start/3.
start/4Traceable variant of gen_server:start/4.
start_link/3Traceable variant of gen_server:start_link/3.
start_link/4Traceable variant of gen_server:start_link/4.
stop/1Equivalent to gen_server:stop / 1.
stop/3Equivalent to gen_server:stop / 3.
with_process_span/1Executes Fun within the process scope span.

Function Details

call/2

call(ServerRef::server_ref(), Request::term()) -> Reply::term()

Equivalent to Call(Name, Request, 5000).

call/3

call(ServerRef::server_ref(), Request::term(), Timeout::timeout()) -> Reply::term()

Traceable variant of gen_server:call/3.

This piggybacks the current span which retrieved by passage_pd:current_span/1 when sending Request to ServerRef. The span will be handled by gen_server_passage:handle_call/3 transparently for the gen_server implementation module.

cast/2

cast(ServerRef::server_ref(), Request::term()) -> ok

Traceable variant of gen_server:cast/2.

This piggybacks the current span which retrieved by passage_pd:current_span/1 when sending Request to ServerRef. The span will be handled by gen_server_passage:handle_cast/2 transparently for the gen_server implementation module.

process_span/0

process_span() -> passage:maybe_span()

Returns the process scope span.

See also: trace_process_lifecycle option of start_option().

reply/2

reply(Client::term(), Reply::term()) -> term()

Equivalent to gen_server:reply / 2.

start/3

start(Module::module(), Args::term(), Options0::start_options()) -> start_result()

Traceable variant of gen_server:start/3.

start/4

start(ServerName::server_name(), Module::module(), Args::term(), Options0::start_options()) -> start_result()

Traceable variant of gen_server:start/4.

start_link/3

start_link(Module::module(), Args::term(), Options0::start_options()) -> start_result()

Traceable variant of gen_server:start_link/3.

start_link/4

start_link(ServerName::server_name(), Module::module(), Args::term(), Options0::start_options()) -> start_result()

Traceable variant of gen_server:start_link/4.

stop/1

stop(ServerRef::server_ref()) -> ok

Equivalent to gen_server:stop / 1.

stop/3

stop(ServerRef::server_ref(), Reason::term(), Timeout::timeout()) -> ok

Equivalent to gen_server:stop / 3.

with_process_span/1

with_process_span(Fun) -> Result

Executes Fun within the process scope span.

See also: trace_process_lifecycle option of start_option().


Generated by EDoc, Nov 1 2017, 03:11:08.