Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Extract watcher, batcher and monitor into pkg/util #245

Merged
merged 8 commits into from
Jul 31, 2019

Conversation

luxas
Copy link
Contributor

@luxas luxas commented Jul 30, 2019

This makes them reusable in a generic manner, and not tied to pkg/storage

@luxas luxas added kind/refactor Categorizes issue or PR as related to refactoring code. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jul 30, 2019
@luxas luxas added this to the v0.5.0 milestone Jul 30, 2019
Copy link
Contributor

@twelho twelho left a comment

Choose a reason for hiding this comment

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

Looks good 👍 ✨
Just one question I want to hear your opinion on before we go ahead and merge.

)

// Update bundles an Event with an
// APIType for Storage retrieval.
type Update struct {
Event Event
Event watcher.Event
Copy link
Contributor

Choose a reason for hiding this comment

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

Event though watcher uses the Events the most, they are not watcher specific, the same events are used to detect changes for Objects in WatchStorage and SyncStorage. Should we move Event to watcher or keep it in update, to be generic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's better to keep the types fairly closely to where they are used. I did not understand the purpose of the types when seeing them grouped in the update package. I think they are a good fit in this package, at least until something more significant changes in the codebase.

Copy link
Contributor

@twelho twelho Jul 31, 2019

Choose a reason for hiding this comment

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

As it seems to work for WatchStorage and SyncStorage in terms of dependencies, LGTM 👍. After a rebase feel free to merge.

@luxas
Copy link
Contributor Author

luxas commented Jul 31, 2019

Rebased; merging now

@luxas luxas merged commit 94f7ca4 into weaveworks:master Jul 31, 2019
@luxas luxas added the kind/enhancement Categorizes issue or PR as related to improving an existing feature. label Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. kind/refactor Categorizes issue or PR as related to refactoring code. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants