-
Notifications
You must be signed in to change notification settings - Fork 596
Clean up comments on iface.go #12844
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,21 +120,13 @@ type HcmContext struct { | |
| // for the duration of the translation. | ||
| // Each of the functions here will be called in the order they appear in the interface. | ||
| type ProxyTranslationPass interface { | ||
| // Name() string | ||
| // called 1 time for each listener | ||
| // ApplyListenerPlugin is called 1 time for each listener | ||
| ApplyListenerPlugin( | ||
| pCtx *ListenerContext, | ||
| out *envoylistenerv3.Listener, | ||
| ) | ||
|
|
||
| // called 1 time for all the routes in a filter chain. Use this to set default PerFilterConfig | ||
| // No policy is provided here. | ||
| ApplyRouteConfigPlugin( | ||
| pCtx *RouteConfigContext, | ||
| out *envoyroutev3.RouteConfiguration, | ||
| ) | ||
|
|
||
| // no policy applied - this is called for every backend in a route. | ||
| // ApplyForBackend is called for every backend in a route. No policy is applied. | ||
| // For this to work the backend needs to register itself as a policy. TODO: rethink this. | ||
| // Note: TypedFilterConfig should be applied in the pCtx and is shared between ApplyForRoute, ApplyForBackend | ||
| // and ApplyForRouteBacken (do not apply on the output route directly) | ||
|
|
@@ -144,16 +136,16 @@ type ProxyTranslationPass interface { | |
| out *envoyroutev3.Route, | ||
| ) error | ||
|
|
||
| // Applies a policy attached to a specific Backend (via extensionRef on the BackendRef). | ||
| // ApplyForRouteBackend applies a policy attached to a specific Backend (via extensionRef on the BackendRef). | ||
| // Note: TypedFilterConfig should be applied in the pCtx and is shared between ApplyForRoute, ApplyForBackend | ||
| // and ApplyForRouteBackend | ||
| ApplyForRouteBackend( | ||
| policy PolicyIR, | ||
| pCtx *RouteBackendContext, | ||
| ) error | ||
|
|
||
| // called once per route rule if SupportsPolicyMerge returns false, otherwise this is called only | ||
| // once on the value returned by MergePolicies. | ||
| // ApplyForRoute is called once per route rule if SupportsPolicyMerge returns false, | ||
| // otherwise this is called only once on the value returned by MergePolicies. | ||
| // Applies policy for an HTTPRoute that has a policy attached via a targetRef. | ||
| // The output configures the envoyroutev3.Route | ||
| // Note: TypedFilterConfig should be applied in the pCtx and is shared between ApplyForRoute, ApplyForBackend | ||
|
|
@@ -168,6 +160,13 @@ type ProxyTranslationPass interface { | |
| out *envoyroutev3.VirtualHost, | ||
| ) | ||
|
|
||
| // ApplyRouteConfigPlugin is called 1 time for all the routes in a filter chain. Use this to set default PerFilterConfig | ||
| // Applies policy for a Gateway that has a policy attached via a targetRef. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Is this fully correct? I think it is only called in certain circumstances, e.g. only for HTTP (or HTTPS) listeners? (as opposed to ApplyVHost) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not entirely sure. I think ApplyForVHost runs when section name is used, where ApplyRouteConfigPlugin runs when targeting whole gateway There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. feel free to check my work but this is what I noted in the code
|
||
| ApplyRouteConfigPlugin( | ||
| pCtx *RouteConfigContext, | ||
| out *envoyroutev3.RouteConfiguration, | ||
| ) | ||
|
|
||
| NetworkFilters() ([]filters.StagedNetworkFilter, error) | ||
|
|
||
| // called 1 time per filter-chain. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.