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

Unified Diff: state/state.go

Issue 6261055: state: add state.Environment (Closed)
Patch Set: state: add state.Environment Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « [revision details] ('k') | state/state_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: state/state.go
=== modified file 'state/state.go'
--- state/state.go 2012-05-29 23:11:41 +0000
+++ state/state.go 2012-05-31 07:19:39 +0000
@@ -74,6 +74,11 @@
return newConfigWatcher(s, zkEnvironmentPath)
}
+// Environment returns the current configuration of the environment.
+func (s *State) Environment() (*ConfigNode, error) {
+ return readConfigNode(s.zk, zkEnvironmentPath)
+}
+
// Machine returns the machine with the given id.
func (s *State) Machine(id int) (*Machine, error) {
key := machineKey(id)
« no previous file with comments | « [revision details] ('k') | state/state_test.go » ('j') | no next file with comments »

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