module ProtoPharm
Serializes metadata for an application's Gruf configuration.
Usage:
Configuration.configure { |c| c.metadata_serializer = ProtoPharm::MetadataSerializers::Gruf } allow_grpc_service(AService) .to receive_rpc(:your_endpoint) .and_fail_with( code: :invalid_argument, app_code: :cant_let_you_do_that_star_fox metadata: { some: :meta } )
begin
Service.your_endpoint
rescue Gruf::Client::Error::InvalidArgument => e
e.error
Constants
- VERSION
Public Class Methods
adapter()
click to toggle source
# File lib/proto_pharm.rb, line 44 def adapter @adapter ||= Adapter.new end
reset!()
click to toggle source
# File lib/proto_pharm.rb, line 36 def reset! ProtoPharm.stub_registry.reset! end
stub_registry()
click to toggle source
# File lib/proto_pharm.rb, line 40 def stub_registry @stub_registry ||= ProtoPharm::StubRegistry.new end