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

Adds support for calling the manage event API with a golang context #175

Closed

Conversation

danmrichards
Copy link

@danmrichards danmrichards commented Oct 4, 2019

Summary

Adds a new ManageEventWithContext function which performs the same task as ManageEvent but allows the caller to supply a context. This context can then be used for request cancellation in the event of a deadline or timeout.

ManageEvent now becomes a wrapper of ManageEventWithContext just passing a background context, the underlying functionality will not have changed.

Reasoning

The current ManageEvent method does not allow this and could become problematic should the HTTP request run slowly. It is preferable to put this control in the hands of the caller, should they want to take advantage of this. If not they can continue to use ManageEvent as normal.

Other Changes

  • Fixed some missing error checking when building the HTTP request
  • Use the HTTP method constant instead of a string literal
  • Fixed package name collision with the bytes variable

@theckman
Copy link
Collaborator

I want to get context.Context support into this package for all methods, and so I'm going to close this now and assume we'll align on a path forward in #267.

@theckman theckman closed this Feb 20, 2021
@danmrichards
Copy link
Author

Sure, thanks for the update @theckman

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

Successfully merging this pull request may close these issues.

None yet

2 participants