Class: Zipkin::BinaryAnnotation

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/zipkin_query/zipkin_core_types.rb,
lib/thrift/thrift/gen-rb/zipkin_core_types.rb

Constant Summary collapse

KEY =
1
VALUE =
2
ANNOTATION_TYPE =
3
HOST =
4
FIELDS =
{
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
  VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true},
  ANNOTATION_TYPE => {:type => ::Thrift::Types::I32, :name => 'annotation_type', :enum_class => ::Zipkin::AnnotationType},
  HOST => {:type => ::Thrift::Types::STRUCT, :name => 'host', :class => ::Zipkin::Endpoint, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



78
# File 'lib/zipkin_query/zipkin_core_types.rb', line 78

def struct_fields; FIELDS; end

#validateObject



80
81
82
83
84
# File 'lib/zipkin_query/zipkin_core_types.rb', line 80

def validate
  unless @annotation_type.nil? || ::Zipkin::AnnotationType::VALID_VALUES.include?(@annotation_type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field annotation_type!')
  end
end