shackle_server (shackle v0.7.1)

View Source

Summary

Types

client_state/0

-type client_state() :: term().

id/0

-type id() :: {shackle_pool:name(), index()}.

index/0

-type index() :: pos_integer().

init_options/0

-type init_options() :: term().

name/0

-type name() :: atom().

opts/0

reconnect_state/0

-type reconnect_state() ::
          #reconnect_state{current :: undefined | shackle:time(),
                           max :: shackle:time() | infinity,
                           min :: shackle:time()}.

state/0

-type state() ::
          #state{address :: shackle:inet_address(),
                 backlog :: shackle:table(),
                 client :: shackle:client(),
                 id :: id(),
                 init_options :: init_options(),
                 name :: name(),
                 parent :: pid(),
                 pool_name :: shackle_pool:name(),
                 port :: shackle:inet_port(),
                 protocol :: shackle:protocol(),
                 queue :: shackle:table(),
                 reconnect_state :: undefined | reconnect_state(),
                 socket :: undefined | shackle:socket(),
                 socket_options :: shackle:socket_options(),
                 timer_ref :: undefined | reference()}.

Functions

handle_msg(Msg, _)

-spec handle_msg(term(), {state(), client_state()}) -> {ok, term()}.

init(Name, Parent, Opts)

-spec init(name(), pid(), opts()) -> no_return().

start_link(Name, Opts)

-spec start_link(name(), opts()) -> {ok, pid()}.

terminate(Reason, _)

-spec terminate(term(), term()) -> ok.