Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Move connection record to rabbit.hrl
Browse files Browse the repository at this point in the history
So that it can be used outside of rabbit_reader.
  • Loading branch information
michaelklishin committed Jul 18, 2016
1 parent 1f1f6a1 commit 6998e6a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 40 deletions.
42 changes: 42 additions & 0 deletions include/rabbit.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,48 @@
%% proplist of limits configured, if any
limits}).

%% Client connection, used by rabbit_reader
%% and related modules.
-record(connection, {
%% e.g. <<"127.0.0.1:55054 -> 127.0.0.1:5672">>
name,
%% server host
host,
%% client host
peer_host,
%% server port
port,
%% client port
peer_port,
%% protocol implementation module,
%% e.g. rabbit_framing_amqp_0_9_1
protocol,
user,
%% heartbeat timeout value used, 0 means
%% heartbeats are disabled
timeout_sec,
%% maximum allowed frame size,
%% see frame_max in the AMQP 0-9-1 spec
frame_max,
%% greatest channel number allowed,
%% see channel_max in the AMQP 0-9-1 spec
channel_max,
vhost,
%% client name, version, platform, etc
client_properties,
%% what lists protocol extensions
%% does this client support?
capabilities,
%% authentication mechanism used
%% as a pair of {Name, Module}
auth_mechanism,
%% authentication mechanism state,
%% initialised by rabbit_auth_mechanism:init/1
%% implementations
auth_state,
%% time of connection
connected_at}).

-record(content,
{class_id,
properties, %% either 'none', or a decoded record/tuple
Expand Down
40 changes: 0 additions & 40 deletions src/rabbit_reader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -103,46 +103,6 @@
%% credit- and resource-driven flow control
throttle}).

-record(connection, {
%% e.g. <<"127.0.0.1:55054 -> 127.0.0.1:5672">>
name,
%% server host
host,
%% client host
peer_host,
%% server port
port,
%% client port
peer_port,
%% protocol implementation module,
%% e.g. rabbit_framing_amqp_0_9_1
protocol,
user,
%% heartbeat timeout value used, 0 means
%% heartbeats are disabled
timeout_sec,
%% maximum allowed frame size,
%% see frame_max in the AMQP 0-9-1 spec
frame_max,
%% greatest channel number allowed,
%% see channel_max in the AMQP 0-9-1 spec
channel_max,
vhost,
%% client name, version, platform, etc
client_properties,
%% what lists protocol extensions
%% does this client support?
capabilities,
%% authentication mechanism used
%% as a pair of {Name, Module}
auth_mechanism,
%% authentication mechanism state,
%% initialised by rabbit_auth_mechanism:init/1
%% implementations
auth_state,
%% time of connection
connected_at}).

-record(throttle, {
%% never | timestamp()
last_blocked_at,
Expand Down

0 comments on commit 6998e6a

Please sign in to comment.