Change StreamListener prototype
Change StreamListener prototype in order to be able to use several
StreamListener's with the same event channel.
Stop a listener when the Readline call fails, since we probably cannot
know if we can resume safely.
package gondole
import (
"github.com/sendgrid/rest"
)
// GetCurrentInstance returns current instance information
func (g *Client) GetCurrentInstance() (*Instance, error) {
var i Instance
if err := g.apiCall("instance", rest.Get, nil, &i); err != nil {
return nil, err
}
return &i, nil
}