Commit graph

3 commits

Author SHA1 Message Date
addshore
c2aa8ba9ea Split ConfiguredReadOnlyMode into own file
Change-Id: I7c12a571bb5ce76c132a738b48b2b82d763a8860
2017-08-07 09:24:19 +00:00
Timo Tijhof
3c620b07ab ReadOnlyMode: Add a few doc blocks
Follows-up 820f46964f.

Change-Id: I7866eb7c8bb9c45a24a3c567a7befe3505821873
2017-04-19 23:13:22 +00:00
Tim Starling
820f46964f A service for read-only mode
Introduce a service to represent wfReadOnly() and friends.

It's necessary to have two service instances, one for wfReadOnly() and
one for wfConfiguredReadOnlyReason(), to avoid a circular dependency,
since LoadBalancer needs the configured reason during construction, but
wfReadOnly() needs to query the currently active load balancer.

Not having a cache of the configuration makes it possible to dynamically
change the configuration. Ideally things would not change the
configuration, and I removed such instances in core, but to support
extensions, I added a test ensuring that the configuration can be changed.

Change-Id: I9bbee946c10742526d3423208efd68cb3cc5a7ee
2017-04-19 12:27:06 -07:00