Class: Trace::BinaryAnnotation
- Inherits:
-
Object
- Object
- Trace::BinaryAnnotation
- Defined in:
- lib/finagle-thrift/tracer.rb
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key, value, annotation_type, host) ⇒ BinaryAnnotation
constructor
A new instance of BinaryAnnotation.
- #to_thrift ⇒ Object
Constructor Details
#initialize(key, value, annotation_type, host) ⇒ BinaryAnnotation
Returns a new instance of BinaryAnnotation.
187 188 189 190 191 192 |
# File 'lib/finagle-thrift/tracer.rb', line 187 def initialize(key, value, annotation_type, host) @key = key @value = value @annotation_type = annotation_type @host = host end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
186 187 188 |
# File 'lib/finagle-thrift/tracer.rb', line 186 def host @host end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
186 187 188 |
# File 'lib/finagle-thrift/tracer.rb', line 186 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
186 187 188 |
# File 'lib/finagle-thrift/tracer.rb', line 186 def value @value end |
Instance Method Details
#to_thrift ⇒ Object
194 195 196 197 198 199 200 201 202 |
# File 'lib/finagle-thrift/tracer.rb', line 194 def to_thrift thrift_host = host ? host.to_thrift : nil FinagleThrift::BinaryAnnotation.new( :key => @key, :value => @value, :annotation_type => Type.to_thrift(@annotation_type), :host => thrift_host ) end |