Sha256: dc40a294fff828cf9a44a22cdadbce5c923b0c03503fc87c7597ab234d9efe1f

Contents?: true

Size: 1.76 KB

Versions: 11

Compression:

Stored size: 1.76 KB

Contents

#
# Autogenerated by Thrift Compiler (1.0.0-upfluence)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'thrift'
require 'base/base_service_types'

module Base
  module BaseService
    class Client
      include ::Thrift::Client

      def greeting(english)
        send_greeting(english)
        return recv_greeting()
      end

      def send_greeting(english)
        send_message('greeting', Greeting_args, :english => english)
      end

      def recv_greeting()
        result = receive_message(Greeting_result)
        return result.success unless result.success.nil?
        raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'greeting failed: unknown result')
      end

    end

    class Processor
      include ::Thrift::Processor

      def process_greeting(seqid, iprot, oprot)
        args = read_args(iprot, Greeting_args)
        result = Greeting_result.new()
        result.success = @handler.greeting(args.english)
        write_result(result, oprot, 'greeting', seqid)
      end

    end

    # HELPER FUNCTIONS AND STRUCTURES

    class Greeting_args
      include ::Thrift::Struct, ::Thrift::Struct_Union
      ENGLISH = 1

      FIELDS = {
        ENGLISH => {:type => ::Thrift::Types::BOOL, :name => 'english'}
      }

      def struct_fields; FIELDS; end

      def validate
      end

      ::Thrift::Struct.generate_accessors self
    end

    class Greeting_result
      include ::Thrift::Struct, ::Thrift::Struct_Union
      SUCCESS = 0

      FIELDS = {
        SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Base::Hello}
      }

      def struct_fields; FIELDS; end

      def validate
      end

      ::Thrift::Struct.generate_accessors self
    end

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
upfluence-thrift-1.0.12 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.11 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.10 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.9 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.8 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.7 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.6 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.5 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.4 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.3 spec/gen-rb/base/base_service.rb
upfluence-thrift-1.0.1 spec/gen-rb/base/base_service.rb