Class: Sbmt::Pact::Provider::GrpcVerifier

Inherits:
BaseVerifier show all
Defined in:
lib/sbmt/pact/provider/grpc_verifier.rb

Constant Summary collapse

PROVIDER_TRANSPORT_TYPE =
"grpc"
INTERACTION_FILTER_REGEX =
"^grpc:.+"

Constants inherited from BaseVerifier

BaseVerifier::DEFAULT_CONSUMER_SELECTORS, BaseVerifier::VERIFICATION_ERRORS

Instance Attribute Summary

Attributes inherited from BaseVerifier

#logger

Instance Method Summary collapse

Methods inherited from BaseVerifier

#verify!

Constructor Details

#initialize(pact_config) ⇒ GrpcVerifier

Returns a new instance of GrpcVerifier.

Raises:

  • (ArgumentError)


13
14
15
16
17
18
# File 'lib/sbmt/pact/provider/grpc_verifier.rb', line 13

def initialize(pact_config)
  super

  raise ArgumentError, "pact_config must be an instance of Sbmt::Pact::Provider::PactConfig::Grpc" unless pact_config.is_a?(::Sbmt::Pact::Provider::PactConfig::Grpc)
  @grpc_server = GrufServer.new(host: "127.0.0.1:#{@pact_config.grpc_port}", services: @pact_config.grpc_services)
end