marina_utils (marina v0.4.3)
View SourceSummary
Types
-type batch_type() :: logged | unlogged | counter.
-type consistency_level() :: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10.
-type frame_flag() :: 0..1.
-type query_opts() :: #{batch_type => batch_type(), consistency_level => consistency_level(), page_size => pos_integer(), paging_state => binary(), pid => pid(), routing_key => routing_key(), skip_metadata => boolean(), timeout => pos_integer(), values => values()}.
-type value() :: binary().
-type values() :: [value()].
Functions
-spec authenticate(inet:socket()) -> ok | {error, atom()}.
-spec connect(inet:socket_address() | inet:hostname(), inet:port_number()) -> {ok, inet:socket()} | {error, atom()}.
-spec frame_flags() -> frame_flag().
-spec query(inet:socket(), iodata()) -> {ok, term()} | {error, term()}.
-spec query_opts(atom(), query_opts()) -> term().
-spec startup(inet:socket()) -> {ok, binary() | undefined} | {error, atom()}.
-spec sync_msg(inet:socket(), iodata()) -> {ok, term()} | {error, term()}.
-spec timeout(pos_integer(), erlang:timestamp()) -> integer().
-spec use_keyspace(inet:socket()) -> ok | {error, atom()}.