Class: Sbmt::Pact::Provider::PactConfig::Grpc

Inherits:
Base
  • Object
show all
Defined in:
lib/sbmt/pact/provider/pact_config/grpc.rb

Constant Summary

Constants inherited from Base

Base::PACT_BROKER_FILTER_TYPE_ASYNC, Base::PACT_BROKER_FILTER_TYPE_GRPC, Base::PACT_BROKER_FILTER_TYPE_HTTP, Base::PACT_BROKER_FILTER_TYPE_NONE, Base::PACT_BROKER_FILTER_TYPE_SYNC

Instance Attribute Summary collapse

Attributes inherited from Base

#broker_password, #broker_url, #broker_username, #consumer_branch, #consumer_name, #consumer_version, #log_level, #pact_proxy_port, #provider_name, #provider_setup_port, #provider_setup_server, #provider_version, #verify_only

Instance Method Summary collapse

Methods inherited from Base

#after_teardown, #before_setup, #message_setup_url, #new_provider_state, #pact_broker_proxy_url, #provider_setup_url, #start_servers, #stop_servers

Constructor Details

#initialize(provider_name:, opts: {}) ⇒ Grpc

Returns a new instance of Grpc.



12
13
14
15
16
17
# File 'lib/sbmt/pact/provider/pact_config/grpc.rb', line 12

def initialize(provider_name:, opts: {})
  super

  @grpc_port = opts[:grpc_port] || 3009
  @grpc_services = opts[:grpc_services] || []
end

Instance Attribute Details

#grpc_portObject (readonly)

Returns the value of attribute grpc_port.



10
11
12
# File 'lib/sbmt/pact/provider/pact_config/grpc.rb', line 10

def grpc_port
  @grpc_port
end

#grpc_serverObject (readonly)

Returns the value of attribute grpc_server.



10
11
12
# File 'lib/sbmt/pact/provider/pact_config/grpc.rb', line 10

def grpc_server
  @grpc_server
end

#grpc_servicesObject (readonly)

Returns the value of attribute grpc_services.



10
11
12
# File 'lib/sbmt/pact/provider/pact_config/grpc.rb', line 10

def grpc_services
  @grpc_services
end

Instance Method Details

#filter_typeObject



19
20
21
# File 'lib/sbmt/pact/provider/pact_config/grpc.rb', line 19

def filter_type
  PACT_BROKER_FILTER_TYPE_GRPC
end

#new_verifierObject



23
24
25
# File 'lib/sbmt/pact/provider/pact_config/grpc.rb', line 23

def new_verifier
  GrpcVerifier.new(self)
end