// SetAgentAlive signals that the agent for unit u is alive. // It returns the started pinger. func (u *Unit) SetAgentAlive() (*presence.Pinger, error) { p := presence.NewPinger(u.st.presence, u.globalKey()) err := p.Start() if err != nil { return nil, err } return p, nil }
// SetAgentAlive signals that the agent for machine m is alive. // It returns the started pinger. func (m *Machine) SetAgentAlive() (*presence.Pinger, error) { p := presence.NewPinger(m.st.presence, m.globalKey()) err := p.Start() if err != nil { return nil, err } return p, nil }