anchor_client (anchor v0.3.6)
View SourceSummary
Types
-type error() :: {error, atom()}.
-type option() :: {async, pid()}.
-type options() :: [option()].
-type response() :: #response{op_code :: non_neg_integer() | undefined, key_length :: non_neg_integer() | undefined, extras_length :: non_neg_integer() | undefined, data_type :: non_neg_integer() | undefined, status :: non_neg_integer() | undefined, body_length :: non_neg_integer() | undefined, opaque :: non_neg_integer() | undefined, cas :: non_neg_integer() | undefined, extras :: binary() | undefined, key :: binary() | undefined, value :: binary() | undefined}.
-type state() :: #state{buffer :: binary(), requests :: non_neg_integer()}.
Functions
-spec handle_data(binary(), state()) -> {ok, [{pos_integer(), term()}], state()}.
-spec handle_request(term(), state()) -> {ok, pos_integer(), binary(), state()}.
-spec init(undefined) -> {ok, state()}.
-spec setup(inet:socket(), state()) -> {ok, state()}.
-spec terminate(state()) -> ok.