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.8.5.pre0 lib/protobuf/rpc/middleware.rb
protobuf-3.8.4 lib/protobuf/rpc/middleware.rb
protobuf-3.8.3 lib/protobuf/rpc/middleware.rb
protobuf-3.8.2 lib/protobuf/rpc/middleware.rb
protobuf-3.8.1 lib/protobuf/rpc/middleware.rb
protobuf-3.8.0 lib/protobuf/rpc/middleware.rb
protobuf-3.8.0.pre1 lib/protobuf/rpc/middleware.rb
protobuf-3.7.5 lib/protobuf/rpc/middleware.rb
protobuf-3.7.4 lib/protobuf/rpc/middleware.rb
protobuf-3.7.3 lib/protobuf/rpc/middleware.rb
protobuf-3.7.2 lib/protobuf/rpc/middleware.rb
protobuf-3.7.2.pre1 lib/protobuf/rpc/middleware.rb
protobuf-3.7.1 lib/protobuf/rpc/middleware.rb
protobuf-3.7.0 lib/protobuf/rpc/middleware.rb
protobuf-3.7.0.pre3 lib/protobuf/rpc/middleware.rb
protobuf-3.6.12 lib/protobuf/rpc/middleware.rb
protobuf-3.6.11 lib/protobuf/rpc/middleware.rb
protobuf-3.6.10 lib/protobuf/rpc/middleware.rb
protobuf-3.7.0.pre2 lib/protobuf/rpc/middleware.rb
protobuf-3.6.9 lib/protobuf/rpc/middleware.rb