Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate primary rule assignments #24

Open
codefromthecrypt opened this issue Oct 3, 2019 · 1 comment
Open

Consolidate primary rule assignments #24

codefromthecrypt opened this issue Oct 3, 2019 · 1 comment

Comments

@codefromthecrypt
Copy link
Contributor

Like this, except for primary rules. This implies care in type checking before returning a corresponding primary sampler.

    .putSecondaryHttpRule("gateway", "gatewayplay",
      pathStartsWith("/play"), RateLimitingSampler.create(50)
    )
    .putSecondaryRule("playback", "gatewayplay",
      passive()
    )
    .putSecondaryRpcRule("auth", "authcache",
      methodEquals("GetToken"), RateLimitingSampler.create(100), 1 /* TTL */
    );
@codefromthecrypt
Copy link
Contributor Author

NOTE: it will look similar but not be exact as primary doesn't support things like TTL or "active/passive" concepts... mainly about the rule declaration part.. first two parameters (matcher, sampler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant