func (n *NodeGroup) DecreaseTargetSize(delta int) error {
	if delta >= 0 {
		return fmt.Errorf("delta must be negative, have: %d", delta)
	}

	targetSize := n.target + delta
	if targetSize < n.MinSize() {
		return fmt.Errorf("size decrease is too small. current: %d desired: %d min: %d",
			n.target, targetSize, n.MinSize())
	}

	// update internal cache
	n.target = targetSize
	return nil
}
// DecreaseTargetSize decreases the target size of the node group. This function
// doesn't permit to delete any existing node and can be used only to reduce the
// request for new nodes that have not been yet fulfilled. Delta should be negative.
// It is assumed that cloud provider will not delete the existing nodes when there
// is an option to just decrease the target. Implementation required.
DecreaseTargetSize decreases the target size of the node group. This function
doesn't permit to delete any existing node and can be used only to reduce the
request for new nodes that have not been yet fulfilled. Delta should be negative.
It is assumed that cloud provider will not delete the existing nodes when there
is an option to just decrease the target. Implementation required.
// DecreaseTargetSize decreases the target size of the node group . This function // doesn ' t permit to delete any existing node and can be used only to reduce the // request for new nodes that have not been yet fulfilled . Delta should be negative . // It is assumed that cloud provider will not delete the existing nodes when there // is an option to just decrease the target . Implementation required .
func (n *NodeGroup) DecreaseTargetSize(delta int) error {
	if delta >= 0 {
		return fmt.Errorf("delta must be negative, have: %d", delta)
	}
	targetSize := n.target + delta
	if targetSize < n.MinSize() {
		return fmt.Errorf("size decrease is too small. current: %d desired: %d min: %d",
			n.target, targetSize, n.MinSize())
	}
	n.target = targetSize
	return nil
}
func ( n * NodeGroup ) DecreaseTargetSize ( delta int ) error { if delta >= 0 { return fmt . Errorf ( " " , delta ) } targetSize := n . target + delta if targetSize < n . MinSize ( ) { return fmt . Errorf ( " " , n . target , targetSize , n . MinSize ( ) ) } n . target = targetSize return nil }
DecreaseTargetSize decreases the target size of the node group.
DecreaseTargetSize decreases the target size of the node group .
// update internal cache