Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Adds exported logplex_msg_buffer:size/0 type.
Browse files Browse the repository at this point in the history
  • Loading branch information
archaelus committed Jun 13, 2012
1 parent 45e8070 commit 829f9cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/logplex_msg_buffer.erl
Expand Up @@ -6,19 +6,20 @@
-module(logplex_msg_buffer).

-record(lpdb, {messages = queue:new(),
max_size = 1024 :: pos_integer(),
max_size = 1024 :: size(),
loss_start = undefined :: 'undefined' | erlang:timestamp(),
loss_count = 0 :: non_neg_integer()
}).

-type msg() :: binary() | tuple().
-type size() :: pos_integer().
-type loss_indication() :: {loss_indication,
N::non_neg_integer(),
When::erlang:timestamp()}.
-type framing_fun()::fun (({msg, msg()} | loss_indication()) ->
{frame, iolist()} | skip).
-opaque buf() :: #lpdb{}.
-export_type([buf/0, framing_fun/0]).
-export_type([buf/0, framing_fun/0, size/0, loss_indication/0]).

-export([new/0
,new/1
Expand Down

0 comments on commit 829f9cf

Please sign in to comment.