GetError returns the container statistics error. This is used to determine whether the statistics are valid or not
()
| 53 | // GetError returns the container statistics error. |
| 54 | // This is used to determine whether the statistics are valid or not |
| 55 | func (cs *Stats) GetError() error { |
| 56 | cs.mutex.RLock() |
| 57 | defer cs.mutex.RUnlock() |
| 58 | return cs.err |
| 59 | } |
| 60 | |
| 61 | // SetErrorAndReset zeroes all the container statistics and store the error. |
| 62 | // It is used when receiving time out error during statistics collecting to reduce lock overhead |