From 5ed30aaa921add0b8a412927c07981abeffb2210 Mon Sep 17 00:00:00 2001 From: Franklin Hu Date: Tue, 26 Jun 2012 16:47:45 -0700 Subject: [PATCH] Generate new query rb code from thrift, bump gem version --- .../zipkin-query/lib/zipkin-query/version.rb | 2 +- .../gen-rb/zipkin-query/zipkin_query.rb | 122 ++++++++++++++++++ 2 files changed, 123 insertions(+), 1 deletion(-) diff --git a/zipkin-gems/zipkin-query/lib/zipkin-query/version.rb b/zipkin-gems/zipkin-query/lib/zipkin-query/version.rb index 2da896ae37d..861721583e6 100644 --- a/zipkin-gems/zipkin-query/lib/zipkin-query/version.rb +++ b/zipkin-gems/zipkin-query/lib/zipkin-query/version.rb @@ -12,5 +12,5 @@ # See the License for the specific language governing permissions and # limitations under the License. module ZipkinQuery - VERSION = "0.0.2" + VERSION = "0.0.3" end diff --git a/zipkin-gems/zipkin-query/vendor/gen-rb/zipkin-query/zipkin_query.rb b/zipkin-gems/zipkin-query/vendor/gen-rb/zipkin-query/zipkin_query.rb index a03a53e1646..8e6fa91b5dd 100644 --- a/zipkin-gems/zipkin-query/vendor/gen-rb/zipkin-query/zipkin_query.rb +++ b/zipkin-gems/zipkin-query/vendor/gen-rb/zipkin-query/zipkin_query.rb @@ -203,6 +203,38 @@ def recv_getDataTimeToLive() raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getDataTimeToLive failed: unknown result') end + def getTopAnnotations(service_name) + send_getTopAnnotations(service_name) + return recv_getTopAnnotations() + end + + def send_getTopAnnotations(service_name) + send_message('getTopAnnotations', GetTopAnnotations_args, :service_name => service_name) + end + + def recv_getTopAnnotations() + result = receive_message(GetTopAnnotations_result) + return result.success unless result.success.nil? + raise result.qe unless result.qe.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTopAnnotations failed: unknown result') + end + + def getTopKeyValueAnnotations(service_name) + send_getTopKeyValueAnnotations(service_name) + return recv_getTopKeyValueAnnotations() + end + + def send_getTopKeyValueAnnotations(service_name) + send_message('getTopKeyValueAnnotations', GetTopKeyValueAnnotations_args, :service_name => service_name) + end + + def recv_getTopKeyValueAnnotations() + result = receive_message(GetTopKeyValueAnnotations_result) + return result.success unless result.success.nil? + raise result.qe unless result.qe.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTopKeyValueAnnotations failed: unknown result') + end + end class Processor @@ -340,6 +372,28 @@ def process_getDataTimeToLive(seqid, iprot, oprot) write_result(result, oprot, 'getDataTimeToLive', seqid) end + def process_getTopAnnotations(seqid, iprot, oprot) + args = read_args(iprot, GetTopAnnotations_args) + result = GetTopAnnotations_result.new() + begin + result.success = @handler.getTopAnnotations(args.service_name) + rescue Zipkin::QueryException => qe + result.qe = qe + end + write_result(result, oprot, 'getTopAnnotations', seqid) + end + + def process_getTopKeyValueAnnotations(seqid, iprot, oprot) + args = read_args(iprot, GetTopKeyValueAnnotations_args) + result = GetTopKeyValueAnnotations_result.new() + begin + result.success = @handler.getTopKeyValueAnnotations(args.service_name) + rescue Zipkin::QueryException => qe + result.qe = qe + end + write_result(result, oprot, 'getTopKeyValueAnnotations', seqid) + end + end # HELPER FUNCTIONS AND STRUCTURES @@ -791,6 +845,74 @@ def validate ::Thrift::Struct.generate_accessors self end + class GetTopAnnotations_args + include ::Thrift::Struct, ::Thrift::Struct_Union + SERVICE_NAME = 1 + + FIELDS = { + SERVICE_NAME => {:type => ::Thrift::Types::STRING, :name => 'service_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetTopAnnotations_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + QE = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + QE => {:type => ::Thrift::Types::STRUCT, :name => 'qe', :class => Zipkin::QueryException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetTopKeyValueAnnotations_args + include ::Thrift::Struct, ::Thrift::Struct_Union + SERVICE_NAME = 1 + + FIELDS = { + SERVICE_NAME => {:type => ::Thrift::Types::STRING, :name => 'service_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetTopKeyValueAnnotations_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + QE = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + QE => {:type => ::Thrift::Types::STRUCT, :name => 'qe', :class => Zipkin::QueryException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + end end