Class: Zipkin::QueryRequest

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/zipkin_query/zipkin_query_types.rb

Constant Summary collapse

SERVICE_NAME =
1
SPAN_NAME =
2
ANNOTATIONS =
3
BINARY_ANNOTATIONS =
4
END_TS =
5
LIMIT =
6
ORDER =
7
FIELDS =
{
  SERVICE_NAME => {:type => ::Thrift::Types::STRING, :name => 'service_name'},
  SPAN_NAME => {:type => ::Thrift::Types::STRING, :name => 'span_name', :optional => true},
  ANNOTATIONS => {:type => ::Thrift::Types::LIST, :name => 'annotations', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
  BINARY_ANNOTATIONS => {:type => ::Thrift::Types::LIST, :name => 'binary_annotations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Zipkin::BinaryAnnotation}, :optional => true},
  END_TS => {:type => ::Thrift::Types::I64, :name => 'end_ts'},
  LIMIT => {:type => ::Thrift::Types::I32, :name => 'limit'},
  ORDER => {:type => ::Thrift::Types::I32, :name => 'order', :enum_class => ::Zipkin::Order}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



191
# File 'lib/zipkin_query/zipkin_query_types.rb', line 191

def struct_fields; FIELDS; end

#validateObject



193
194
195
196
197
# File 'lib/zipkin_query/zipkin_query_types.rb', line 193

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