client: add Indicate method

This commit is contained in:
Aleksandr Razumov
2017-07-19 00:03:38 +02:00
parent 626e9df563
commit d59300659e

View File

@@ -154,6 +154,12 @@ func (c *Client) Close() error {
} }
} }
// Indicate sends indication m to server. Shorthand to Do call
// with zero deadline and callback.
func (c *Client) Indicate(m *Message) error {
return c.Do(m, time.Time{}, nil)
}
// Do starts transaction (if f set) and writes message to server. // Do starts transaction (if f set) and writes message to server.
func (c *Client) Do(m *Message, d time.Time, f func(AgentEvent)) error { func (c *Client) Do(m *Message, d time.Time, f func(AgentEvent)) error {
if f != nil { if f != nil {