// This call blocks until it is either connected, or an error occurs.
// Only one connection attempt will be performed.
func ConnectStats(stats adapter.StatsAPI) (*StatsConnection, error) {
// This call blocks until it is either connected, or an error occurs.
// Only one connection attempt will be performed.
func ConnectStats(stats adapter.StatsAPI) (*StatsConnection, error) {
func (c *StatsConnection) GetSystemStats(sysStats *api.SystemStats) (err error) {
if err := c.updateStats(&c.sysStatsData, SystemStatsPrefix); err != nil {
return err
func (c *StatsConnection) GetSystemStats(sysStats *api.SystemStats) (err error) {
if err := c.updateStats(&c.sysStatsData, SystemStatsPrefix); err != nil {
return err