Class: Krakow::Command::Identify
- Inherits:
-
Krakow::Command
- Object
- Krakow::Command
- Krakow::Command::Identify
- Defined in:
- lib/krakow/command/identify.rb
Overview
Update client metadata on server / negotiate features
Instance Attribute Summary (collapse)
-
- (Krakow::FrameType) response
inherited
from Krakow::Command
Response to command.
Attributes (collapse)
-
- ([TrueClass, FalseClass]) deflate
The deflate attribute.
-
- (TrueClass, FalseClass) deflate?
Truthiness of the deflate attribute.
-
- (Integer) deflate_level
The deflate_level attribute.
-
- (TrueClass, FalseClass) deflate_level?
Truthiness of the deflate_level attribute.
-
- ([TrueClass, FalseClass]) feature_negotiation
The feature_negotiation attribute.
-
- (TrueClass, FalseClass) feature_negotiation?
Truthiness of the feature_negotiation attribute.
-
- (Numeric) heartbeat_interval
The heartbeat_interval attribute.
-
- (TrueClass, FalseClass) heartbeat_interval?
Truthiness of the heartbeat_interval attribute.
-
- ([String, Numeric]) long_id
The long_id attribute.
-
- (TrueClass, FalseClass) long_id?
Truthiness of the long_id attribute.
-
- (Integer) output_buffer_size
The output_buffer_size attribute.
-
- (TrueClass, FalseClass) output_buffer_size?
Truthiness of the output_buffer_size attribute.
-
- (Integer) output_buffer_timeout
The output_buffer_timeout attribute.
-
- (TrueClass, FalseClass) output_buffer_timeout?
Truthiness of the output_buffer_timeout attribute.
-
- (Integer) sample_rate
The sample_rate attribute.
-
- (TrueClass, FalseClass) sample_rate?
Truthiness of the sample_rate attribute.
-
- ([String, Numeric]) short_id
The short_id attribute.
-
- (TrueClass, FalseClass) short_id?
Truthiness of the short_id attribute.
-
- ([TrueClass, FalseClass]) snappy
The snappy attribute.
-
- (TrueClass, FalseClass) snappy?
Truthiness of the snappy attribute.
-
- ([TrueClass, FalseClass]) tls_v1
The tls_v1 attribute.
-
- (TrueClass, FalseClass) tls_v1?
Truthiness of the tls_v1 attribute.
Class Method Summary (collapse)
Instance Method Summary (collapse)
Instance Attribute Details
- (Krakow::FrameType) response Originally defined in class Krakow::Command
Returns response to command
Class Method Details
+ (Object) error
47 48 49 |
# File 'lib/krakow/command/identify.rb', line 47 def error %w(E_INVALID E_BAD_BODY) end |
+ (Object) ok
43 44 45 |
# File 'lib/krakow/command/identify.rb', line 43 def ok %w(OK) end |
Instance Method Details
- ([TrueClass, FalseClass]) deflate
Returns the deflate attribute
24 |
# File 'lib/krakow/command/identify.rb', line 24 attribute :deflate, [TrueClass, FalseClass] |
- (TrueClass, FalseClass) deflate?
Returns truthiness of the deflate attribute
24 |
# File 'lib/krakow/command/identify.rb', line 24 attribute :deflate, [TrueClass, FalseClass] |
- (Integer) deflate_level
Returns the deflate_level attribute
25 |
# File 'lib/krakow/command/identify.rb', line 25 attribute :deflate_level, Integer |
- (TrueClass, FalseClass) deflate_level?
Returns truthiness of the deflate_level attribute
25 |
# File 'lib/krakow/command/identify.rb', line 25 attribute :deflate_level, Integer |
- ([TrueClass, FalseClass]) feature_negotiation
Returns the feature_negotiation attribute
18 |
# File 'lib/krakow/command/identify.rb', line 18 attribute :feature_negotiation, [TrueClass, FalseClass] |
- (TrueClass, FalseClass) feature_negotiation?
Returns truthiness of the feature_negotiation attribute
18 |
# File 'lib/krakow/command/identify.rb', line 18 attribute :feature_negotiation, [TrueClass, FalseClass] |
- (Numeric) heartbeat_interval
Returns the heartbeat_interval attribute
19 |
# File 'lib/krakow/command/identify.rb', line 19 attribute :heartbeat_interval, Numeric |
- (TrueClass, FalseClass) heartbeat_interval?
Returns truthiness of the heartbeat_interval attribute
19 |
# File 'lib/krakow/command/identify.rb', line 19 attribute :heartbeat_interval, Numeric |
- ([String, Numeric]) long_id
Returns the long_id attribute
17 |
# File 'lib/krakow/command/identify.rb', line 17 attribute :long_id, [String, Numeric], :required => true |
- (TrueClass, FalseClass) long_id?
Returns truthiness of the long_id attribute
17 |
# File 'lib/krakow/command/identify.rb', line 17 attribute :long_id, [String, Numeric], :required => true |
- (Integer) output_buffer_size
Returns the output_buffer_size attribute
20 |
# File 'lib/krakow/command/identify.rb', line 20 attribute :output_buffer_size, Integer |
- (TrueClass, FalseClass) output_buffer_size?
Returns truthiness of the output_buffer_size attribute
20 |
# File 'lib/krakow/command/identify.rb', line 20 attribute :output_buffer_size, Integer |
- (Integer) output_buffer_timeout
Returns the output_buffer_timeout attribute
21 |
# File 'lib/krakow/command/identify.rb', line 21 attribute :output_buffer_timeout, Integer |
- (TrueClass, FalseClass) output_buffer_timeout?
Returns truthiness of the output_buffer_timeout attribute
21 |
# File 'lib/krakow/command/identify.rb', line 21 attribute :output_buffer_timeout, Integer |
- (Integer) sample_rate
Returns the sample_rate attribute
26 |
# File 'lib/krakow/command/identify.rb', line 26 attribute :sample_rate, Integer |
- (TrueClass, FalseClass) sample_rate?
Returns truthiness of the sample_rate attribute
26 |
# File 'lib/krakow/command/identify.rb', line 26 attribute :sample_rate, Integer |
- ([String, Numeric]) short_id
Returns the short_id attribute
16 |
# File 'lib/krakow/command/identify.rb', line 16 attribute :short_id, [String, Numeric], :required => true |
- (TrueClass, FalseClass) short_id?
Returns truthiness of the short_id attribute
16 |
# File 'lib/krakow/command/identify.rb', line 16 attribute :short_id, [String, Numeric], :required => true |
- ([TrueClass, FalseClass]) snappy
Returns the snappy attribute
23 |
# File 'lib/krakow/command/identify.rb', line 23 attribute :snappy, [TrueClass, FalseClass] |
- (TrueClass, FalseClass) snappy?
Returns truthiness of the snappy attribute
23 |
# File 'lib/krakow/command/identify.rb', line 23 attribute :snappy, [TrueClass, FalseClass] |
- ([TrueClass, FalseClass]) tls_v1
Returns the tls_v1 attribute
22 |
# File 'lib/krakow/command/identify.rb', line 22 attribute :tls_v1, [TrueClass, FalseClass] |
- (TrueClass, FalseClass) tls_v1?
Returns truthiness of the tls_v1 attribute
22 |
# File 'lib/krakow/command/identify.rb', line 22 attribute :tls_v1, [TrueClass, FalseClass] |
- (Object) to_line
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/krakow/command/identify.rb', line 30 def to_line filtered = Hash[* arguments.map do |key, value| unless(value.nil?) [key, value] end end.compact.flatten ] payload = MultiJson.dump(filtered) [name, "\n", payload.length, payload].pack('a*a*l>a*') end |