-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
implement connection gating at the top level #881
Conversation
@@ -76,7 +78,7 @@ func callConstructor(c reflect.Value, args []reflect.Value) (interface{}, error) | |||
return val, err | |||
} | |||
|
|||
type constructor func(h host.Host, u *tptu.Upgrader) interface{} | |||
type constructor func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the motivation to change this function signature? It's not really an issue, but it's redundant with the ConnGater
field of the upgrader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I had the same thought but given the types are internal, I thought it wouldn't harm us to rectify later. Wanna tackle that as a follow-up, @aarshkshah1992?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was an oversight. I'll create a follow up PR to get rid of this. #951 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Note: this isn't a super high priority.
For #872.
Filter
andFilterAddress
API in favour of theConnectionGater
API.Filter
and by extensionFilterAddress
OR theConnectionGater
but NOT both.Filters
is adapted to aConnectionGater
by means ofFilterConnectionGater
ConenctionGater
to the "reflection magic" so it is available to Transports that need it.