Sha256: f0bf8d0cc58e703ce6431472df7b62e45f37aa0b7774b9fc422150898a8b3bf7
Contents?: true
Size: 726 Bytes
Versions: 13
Compression:
Stored size: 726 Bytes
Contents
module RabbitMQ module Toxiproxy RABBITMQ_UPSTREAM_HOST = if !ENV["LOCAL_RABBITMQ"].nil? # a local Toxiproxy/RabbitMQ combination "localhost" else # docker-compose "rabbitmq" end def setup_toxiproxy ::Toxiproxy.populate([{ name: "rabbitmq", listen: "0.0.0.0:11111", upstream: "#{RABBITMQ_UPSTREAM_HOST}:5672" }]) rabbitmq_toxiproxy.enable end def cleanup_toxiproxy ::Toxiproxy.populate() end def rabbitmq_toxiproxy ::Toxiproxy[/rabbitmq/] end end end
Version data entries
13 entries across 13 versions & 1 rubygems