Sha256: 4f513124e76560c6377f94db63b7b5ba59860567767abc9ba0a42de83d47eb35

Contents?: true

Size: 1.88 KB

Versions: 23

Compression:

Stored size: 1.88 KB

Contents

#
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'thrift'
require 'facebook_service'
require 'scribe_types'

module Scribe
  class Client < FacebookService::Client 
    include ::Thrift::Client

    def Log(messages)
      send_Log(messages)
      return recv_Log()
    end

    def send_Log(messages)
      send_message('Log', Log_args, :messages => messages)
    end

    def recv_Log()
      result = receive_message(Log_result)
      return result.success unless result.success.nil?
      raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'Log failed: unknown result')
    end

  end

  class Processor < FacebookService::Processor 
    include ::Thrift::Processor

    def process_Log(seqid, iprot, oprot)
      args = read_args(iprot, Log_args)
      result = Log_result.new()
      result.success = @handler.Log(args.messages)
      write_result(result, oprot, 'Log', seqid)
    end

  end

  # HELPER FUNCTIONS AND STRUCTURES

  class Log_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    MESSAGES = 1

    FIELDS = {
      MESSAGES => {:type => ::Thrift::Types::LIST, :name => 'messages', :element => {:type => ::Thrift::Types::STRUCT, :class => LogEntry}}
    }

    def struct_fields; FIELDS; end

    def validate
    end

    ::Thrift::Struct.generate_accessors self
  end

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

    FIELDS = {
      SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => ResultCode}
    }

    def struct_fields; FIELDS; end

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

    ::Thrift::Struct.generate_accessors self
  end

end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
snowflake-client-1.0.3 lib/scribe.rb
fluent-plugin-scribe-1.0.0 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.14 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.13 lib/fluent/plugin/thrift/scribe.rb
snowflake-client-1.0.2 lib/scribe.rb
fluent-plugin-scribe-0.10.12 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.11 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.10 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.9 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.8 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.7 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.6 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.5 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.4 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.3 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.2 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.1 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.10.0 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.9.11 lib/fluent/plugin/thrift/scribe.rb
fluent-plugin-scribe-0.9.10 lib/fluent/plugin/thrift/scribe.rb