Index: state/machine.go |
=== modified file 'state/machine.go' |
--- state/machine.go 2014-05-20 17:57:10 +0000 |
+++ state/machine.go 2014-06-02 12:07:49 +0000 |
@@ -650,13 +650,14 @@ |
return nil |
} |
-// AgentAlive returns whether the respective remote agent is alive. |
-func (m *Machine) AgentAlive() (bool, error) { |
- return m.st.pwatcher.Alive(m.globalKey()) |
+// AgentPresence returns whether the respective remote agent is alive. |
+func (m *Machine) AgentPresence() (bool, error) { |
+ b, err := m.st.pwatcher.Alive(m.globalKey()) |
+ return b, err |
} |
-// WaitAgentAlive blocks until the respective agent is alive. |
-func (m *Machine) WaitAgentAlive(timeout time.Duration) (err error) { |
+// WaitAgentPresence blocks until the respective agent is alive. |
+func (m *Machine) WaitAgentPresence(timeout time.Duration) (err error) { |
defer errors.Maskf(&err, "waiting for agent of machine %v", m) |
ch := make(chan presence.Change) |
m.st.pwatcher.Watch(m.globalKey(), ch) |
@@ -676,9 +677,9 @@ |
panic(fmt.Sprintf("presence reported dead status twice in a row for machine %v", m)) |
} |
-// SetAgentAlive signals that the agent for machine m is alive. |
+// SetAgentPresence signals that the agent for machine m is alive. |
// It returns the started pinger. |
-func (m *Machine) SetAgentAlive() (*presence.Pinger, error) { |
+func (m *Machine) SetAgentPresence() (*presence.Pinger, error) { |
p := presence.NewPinger(m.st.presence, m.globalKey()) |
err := p.Start() |
if err != nil { |