deis / deis/steward-framework

Use watch.Filter inside the watch functions

Open
#58 0 comments 0 reactions 0 assignees View on GitHub
refactor
Dominant language
Go
Stars
6
Forks
3
PR merge metrics
No merged PRs in 30d

Description

#53 will use the dynamic kubernetes client to watch 3pr resources. The watch events come back as `runtime.Object`s that can't be type-asserted to the proper 3pr types, so we've written a translation function to do so. Whatever code receives on the event channel is required to call that function.

Instead of requiring that func to be called, the watch functions themselves should call `watch.Filter` to return a new `watch.Interface` that internally (via the filter func) calls the translation function, so that none of the receivers will need to.

Requires #53

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.