Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4833)

Issue 10944044: state/apiserver: StringsWatcher common impl. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by dimitern
Modified:
10 years, 9 months ago
Reviewers:
mp+173896, jameinel, fwereade
Visibility:
Public.

Description

state/apiserver: StringsWatcher common impl. Replaced srvLifecycleWatcher with srvStringsWatcher. This will be the server-side implementation for any watcher that returns a list of strings, like the LifecycleWatcher, MinUnitsWatcher, UnitsWatcher, or MachineUnitsWatcher. At client side of the API there will be a single StringsWatcher implementation of all these watchers, thus greatly reducing code duplication (as in state). Also, CleanupWatcher was made conformant with NotifyWatcher, since it's the same interface. Workers were updated to reflect the changes to the interface and a new api/interface.go was introduced to keep the watcher's interfaces there. https://code.launchpad.net/~dimitern/juju-core/066-apiserver-stringswatcher/+merge/173896 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : state/apiserver: StringsWatcher common impl. #

Total comments: 2

Patch Set 3 : state/apiserver: StringsWatcher common impl. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -68 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A state/api/interfaces.go View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M state/api/params/internal.go View 1 2 chunks +7 lines, -24 lines 0 comments Download
M state/api/watcher/watcher.go View 1 7 chunks +18 lines, -13 lines 0 comments Download
M state/apiserver/root.go View 2 chunks +5 lines, -6 lines 0 comments Download
M state/apiserver/watcher.go View 1 chunk +11 lines, -11 lines 0 comments Download
M state/watcher.go View 1 2 chunks +7 lines, -7 lines 0 comments Download
M worker/cleaner/cleaner.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M worker/notifyworker.go View 1 3 chunks +3 lines, -3 lines 0 comments Download
M worker/notifyworker_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8
dimitern
Please take a look.
10 years, 9 months ago (2013-07-10 09:54:53 UTC) #1
fwereade
LGTM, but one quibble re description: I don't mind the client side having distinct types ...
10 years, 9 months ago (2013-07-10 10:00:37 UTC) #2
jameinel
LGTM This looks like progress to me, so even if it isn't perfect better to ...
10 years, 9 months ago (2013-07-10 10:11:39 UTC) #3
dimitern
Please take a look. https://codereview.appspot.com/10944044/diff/1/state/api/watcher/watcher.go File state/api/watcher/watcher.go (left): https://codereview.appspot.com/10944044/diff/1/state/api/watcher/watcher.go#oldcode193 state/api/watcher/watcher.go:193: func (w *LifecycleWatcher) loop() error ...
10 years, 9 months ago (2013-07-10 10:45:25 UTC) #4
jameinel
I'm a little unsure of what should be in 'params' and what should be in ...
10 years, 9 months ago (2013-07-10 10:52:13 UTC) #5
fwereade
LGTM, just one note: the workers that were using params.*Watcher should probably really be using ...
10 years, 9 months ago (2013-07-10 11:05:08 UTC) #6
dimitern
https://codereview.appspot.com/10944044/diff/6001/state/api/interface.go File state/api/interface.go (right): https://codereview.appspot.com/10944044/diff/6001/state/api/interface.go#newcode3 state/api/interface.go:3: On 2013/07/10 10:52:13, jameinel wrote: > The other packages ...
10 years, 9 months ago (2013-07-10 11:07:31 UTC) #7
dimitern
10 years, 9 months ago (2013-07-10 11:14:16 UTC) #8
Please take a look.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b