Index: state/machine.go |
=== modified file 'state/machine.go' |
--- state/machine.go 2012-05-30 01:11:22 +0000 |
+++ state/machine.go 2012-06-05 22:50:35 +0000 |
@@ -35,7 +35,7 @@ |
func (m *Machine) WaitAgentAlive(timeout time.Duration) error { |
err := presence.WaitAlive(m.st.zk, m.zkAgentPath(), timeout) |
if err != nil { |
- return fmt.Errorf("state: waiting for agent of machine %d: %v", m.Id(), err) |
+ return fmt.Errorf("state: waiting for agent of machine %s: %v", m, err) |
} |
return nil |
} |
@@ -75,6 +75,11 @@ |
return err |
} |
+// String returns a unique description of this machine |
+func (m *Machine) String() string { |
+ return strconv.Itoa(m.Id()) |
+} |
+ |
// zkKey returns the ZooKeeper key of the machine. |
func (m *Machine) zkKey() string { |
return m.key |