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.10.9 lib/protobuf/rpc/middleware.rb
protobuf-3.10.8 lib/protobuf/rpc/middleware.rb
protobuf-3.10.7 lib/protobuf/rpc/middleware.rb
protobuf-3.10.6 lib/protobuf/rpc/middleware.rb
protobuf-3.10.5 lib/protobuf/rpc/middleware.rb
protobuf-3.10.4 lib/protobuf/rpc/middleware.rb
protobuf-cucumber-3.10.8 lib/protobuf/rpc/middleware.rb
protobuf-cucumber-3.10.7 lib/protobuf/rpc/middleware.rb
protobuf-cucumber-3.10.6 lib/protobuf/rpc/middleware.rb
protobuf-cucumber-3.10.5 lib/protobuf/rpc/middleware.rb
protobuf-cucumber-3.10.4 lib/protobuf/rpc/middleware.rb
protobuf-3.10.3 lib/protobuf/rpc/middleware.rb
protobuf-3.10.2 lib/protobuf/rpc/middleware.rb
protobuf-3.10.1 lib/protobuf/rpc/middleware.rb
protobuf-3.10.0 lib/protobuf/rpc/middleware.rb
protobuf-3.10.0.pre0 lib/protobuf/rpc/middleware.rb
protobuf-3.9.0 lib/protobuf/rpc/middleware.rb
protobuf-3.9.0.pre2 lib/protobuf/rpc/middleware.rb
protobuf-3.9.0.pre lib/protobuf/rpc/middleware.rb
protobuf-3.8.5 lib/protobuf/rpc/middleware.rb