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

Unified Diff: state/api/params/params.go

Issue 8086045: Expose more delta information
Patch Set: Expose more delta information Created 12 years 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 | « juju/conn_test.go ('k') | state/api/params/params_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: state/api/params/params.go
=== modified file 'state/api/params/params.go'
--- state/api/params/params.go 2013-04-01 15:47:49 +0000
+++ state/api/params/params.go 2013-04-01 20:00:40 +0000
@@ -294,9 +294,50 @@
func (i *ServiceInfo) EntityId() interface{} { return i.Name }
func (i *ServiceInfo) EntityKind() string { return "service" }
+// ResolvedMode describes the way state transition errors
+// are resolved.
+type ResolvedMode string
+
+const (
+ ResolvedNone ResolvedMode = ""
+ ResolvedRetryHooks ResolvedMode = "retry-hooks"
+ ResolvedNoHooks ResolvedMode = "no-hooks"
+)
+
+// Port identifies a network port number for a particular protocol.
+type Port struct {
+ Protocol string
+ Number int
+}
+
+func (p Port) String() string {
+ return fmt.Sprintf("%s:%d", p.Protocol, p.Number)
+}
+
+// UnitStatus represents the status of the unit agent.
+type UnitStatus string
+
+const (
+ UnitPending UnitStatus = "pending" // Agent hasn't started
+ UnitInstalled UnitStatus = "installed" // Agent has run the installed hook
+ UnitStarted UnitStatus = "started" // Agent is running properly
+ UnitStopped UnitStatus = "stopped" // Agent has stopped running on request
+ UnitError UnitStatus = "error" // Agent is waiting in an error state
+ UnitDown UnitStatus = "down" // Agent is down or not communicating
+)
+
type UnitInfo struct {
- Name string `bson:"_id"`
- Service string
+ Name string `bson:"_id"`
+ Service string
+ Series string
+ CharmURL *charm.URL
+ PublicAddress string
+ PrivateAddress string
+ MachineId string
+ Resolved ResolvedMode
+ Ports []Port
+ Status UnitStatus
+ StatusInfo string
}
func (i *UnitInfo) EntityId() interface{} { return i.Name }
« no previous file with comments | « juju/conn_test.go ('k') | state/api/params/params_test.go » ('j') | no next file with comments »

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