diff options
| -rw-r--r-- | src/rabbit_msg_file.erl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/rabbit_msg_file.erl b/src/rabbit_msg_file.erl index 70b04c0900..6124b989c6 100644 --- a/src/rabbit_msg_file.erl +++ b/src/rabbit_msg_file.erl @@ -35,6 +35,8 @@ %%---------------------------------------------------------------------------- +-include("rabbit.hrl"). + -define(INTEGER_SIZE_BYTES, 8). -define(INTEGER_SIZE_BITS, (8 * ?INTEGER_SIZE_BYTES)). -define(WRITE_OK_SIZE_BITS, 8). @@ -44,6 +46,20 @@ %%---------------------------------------------------------------------------- +-ifdef(use_specs). + +-spec(append/4 :: (any(), msg_id(), binary(), boolean()) -> + ({'ok', non_neg_integer()} | any())). +-spec(read/2 :: (any(), non_neg_integer()) -> + ({'ok', {msg_id(), binary(), boolean(), non_neg_integer()}} | + any())). +-spec(scan/1 :: (any()) -> {'ok', [{msg_id(), boolean(), non_neg_integer(), + non_neg_integer()}]}). + +-endif. + +%%---------------------------------------------------------------------------- + append(FileHdl, MsgId, MsgBody, IsPersistent) when is_binary(MsgBody) -> BodySize = size(MsgBody), MsgIdBin = term_to_binary(MsgId), |
