-
Notifications
You must be signed in to change notification settings - Fork 260
create nnc listener concept and adapt existing poolmonitor and swift … #1323
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
Conversation
…service to it Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
|
|
||
| type NodeNetworkConfigListenerFunc func(*v1alpha.NodeNetworkConfig) error | ||
|
|
||
| func (f NodeNetworkConfigListenerFunc) Update(nnc *v1alpha.NodeNetworkConfig) error { |
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.
neat, haven't seen this pattern much but seems pretty clean to me
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.
it is a little on the abstract side, but it is cleaner than needing to attach these funcs to a stub struct as methods when the right closure provides all the context we need. it's the same pattern as http.Handler/http.HandlerFunc 🙂
| } | ||
| responseCode := cnscli.CreateOrUpdateNetworkContainerInternal(&ncRequest) | ||
| err = restserver.ResponseCodeToError(responseCode) | ||
| if err != nil { |
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.
can combine if err := restserver.ResponseCode ...; err != nil
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.
incorporated this in the next one
…service to it (Azure#1323) Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
…service to it
Signed-off-by: Evan Baker rbtr@users.noreply.github.com
Reason for Change:
Issue Fixed:
Requirements:
Notes: