Class ProxyRegistry

java.lang.Object
io.camunda.zeebe.qa.util.testcontainers.ProxyRegistry

public final class ProxyRegistry extends Object
A utility registry to keep track of proxies that were created for a given ToxiproxyContainer. Proxies are identified by their upstream target, and cannot be removed from the registry for now.

NOTE: before proxies can be created, the associated container must be started!

NOTE: this class should be extended based on usage, i.e. as needed.

  • Constructor Details

    • ProxyRegistry

      public ProxyRegistry(org.testcontainers.containers.ToxiproxyContainer toxiproxy)
  • Method Details

    • getOrCreateProxy

      public ProxyRegistry.ContainerProxy getOrCreateProxy(String upstream)
      Returns the proxy associated with the given upstream, or creates a new instance.
      Parameters:
      upstream - the upstream endpoint that the proxy points to
      Returns:
      a ProxyRegistry.ContainerProxy which can be used to access the proxy