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

Feature: Add Ctx Version of all Channel / Connection methods #9

Open
peake100 opened this issue Jan 8, 2021 · 1 comment
Open

Feature: Add Ctx Version of all Channel / Connection methods #9

peake100 opened this issue Jan 8, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@peake100
Copy link
Owner

peake100 commented Jan 8, 2021

It would be nice to be able to have a version of all Channel methods that can take in a Ctx and exit on error.

@peake100 peake100 added the enhancement New feature or request label Jan 8, 2021
@peake100 peake100 added the help wanted Extra attention is needed label Apr 21, 2021
@peake100
Copy link
Owner Author

I think a good approach to this would be to add a .WithCtx(ctx context.Context) namespace method that returns a type which in turn exposes the method, that way we won't pollute the namespace by doubling up every method.

The API would be something like:

info, err := channel.WithCtx(ctx).QueueInspect("queue_name", false)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant