code: func (cm *ClientManager) SetRechargeCurve(curve PieceWiseLinear) {
  	cm.lock.Lock()
  	defer cm.lock.Unlock()
  
  	now := cm.clock.Now()
  	cm.updateRecharge(now)
  	cm.updateCapFactor(now, false)
  	cm.curve = curve
  	if len(curve) > 0 {
  		cm.totalRecharge = curve[len(curve)-1].Y
  	} else {
  		cm.totalRecharge = 0
  	}
  	cm.refreshCapacity()
  }
docs: // SetRechargeCurve updates the recharge curve