Sha256: f22e43a5331006bb9bb1279d87eff4b3cbb5404e051661f52bf96c2de84a8132

Contents?: true

Size: 771 Bytes

Versions: 79

Compression:

Stored size: 771 Bytes

Contents

require 'middleware'

require 'protobuf/rpc/middleware/exception_handler'
require 'protobuf/rpc/middleware/logger'
require 'protobuf/rpc/middleware/request_decoder'
require 'protobuf/rpc/middleware/response_encoder'
require 'protobuf/rpc/middleware/runner'

module Protobuf
  module Rpc
    def self.middleware
      @middleware ||= ::Middleware::Builder.new(:runner_class => ::Protobuf::Rpc::Middleware::Runner)
    end

    # Ensure the middleware stack is initialized
    middleware
  end

  Rpc.middleware.use(Rpc::Middleware::ExceptionHandler)
  Rpc.middleware.use(Rpc::Middleware::RequestDecoder)
  Rpc.middleware.use(Rpc::Middleware::Logger)
  Rpc.middleware.use(Rpc::Middleware::ResponseEncoder)

  ActiveSupport.run_load_hooks(:protobuf_rpc_middleware, Rpc)
end

Version data entries

79 entries across 79 versions & 4 rubygems

Version Path
protobuf-3.7.0.pre1 lib/protobuf/rpc/middleware.rb
protobuf-3.7.0.pre0 lib/protobuf/rpc/middleware.rb
protobuf-3.6.7 lib/protobuf/rpc/middleware.rb
protobuf-3.6.6 lib/protobuf/rpc/middleware.rb
protobuf-3.6.2 lib/protobuf/rpc/middleware.rb
protobuf-3.6.1 lib/protobuf/rpc/middleware.rb
protobuf-3.6.0 lib/protobuf/rpc/middleware.rb
protobuf-3.5.5 lib/protobuf/rpc/middleware.rb
protobuf-3.5.4 lib/protobuf/rpc/middleware.rb
protobuf-3.5.3 lib/protobuf/rpc/middleware.rb
protobuf-3.5.2 lib/protobuf/rpc/middleware.rb
protobuf-3.5.1 lib/protobuf/rpc/middleware.rb
prepor-protobuf-3.5.1 lib/protobuf/rpc/middleware.rb
prepor-protobuf-3.5.0 lib/protobuf/rpc/middleware.rb
protobuf-3.5.0 lib/protobuf/rpc/middleware.rb
protobuf-3.4.4 lib/protobuf/rpc/middleware.rb
protobuf-3.4.3 lib/protobuf/rpc/middleware.rb
protobuf-3.4.2 lib/protobuf/rpc/middleware.rb
protobuf-3.4.1 lib/protobuf/rpc/middleware.rb
protobuf-3.4.0 lib/protobuf/rpc/middleware.rb