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

Update ServerInHandle comments #1437

Merged
merged 2 commits into from
Aug 14, 2017
Merged

Update ServerInHandle comments #1437

merged 2 commits into from
Aug 14, 2017

Conversation

menghanl
Copy link
Contributor

fixes #1436

tap/tap.go Outdated
// ServerInHandle defines the function which runs before a new stream is created
// on the server side. If it returns a non-nil error, the stream will not be
// created and a RST_STREAM will be sent back to the client with REFUSED_STREAM.
// The client will receive a RPC error "code = Unavailable, desc = stream
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: an RPC error

tap/tap.go Outdated
// terminated by RST_STREAM with error code: REFUSED_STREAM".
//
// It's intended to be used in situations where you don't want to waste the
// resource to accept the new stream (e.g. rate-limiting). And the content of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: resources

tap/tap.go Outdated
// Note that it is executed in the per-connection I/O goroutine(s) instead of
// per-RPC goroutine. Therefore, users should NOT have any
// blocking/time-consuming work in this handle. Otherwise all the RPCs would
// slow down.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a note about how that means it also won't be called multiple times at once, and so doesn't need to be thread-safe?

@menghanl
Copy link
Contributor Author

Thanks for the review. All fixed. PTAL.

@menghanl menghanl merged commit 43d1787 into grpc:master Aug 14, 2017
@menghanl menghanl deleted the intap_comment branch August 14, 2017 17:05
@menghanl menghanl added 1.6 Type: Documentation Documentation or examples labels Aug 24, 2017
@dfawley dfawley modified the milestone: 1.6 Release Aug 28, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Documentation Documentation or examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors returned from InTapHandle are lost
2 participants