Documentation ¶
Index ¶
- type NodeGroupChangeObserver
- type NodeGroupChangeObserversList
- func (l *NodeGroupChangeObserversList) Register(o NodeGroupChangeObserver)
- func (l *NodeGroupChangeObserversList) RegisterFailedScaleDown(nodeGroup cloudprovider.NodeGroup, reason string, currentTime time.Time)
- func (l *NodeGroupChangeObserversList) RegisterFailedScaleUp(nodeGroup cloudprovider.NodeGroup, reason string, ...)
- func (l *NodeGroupChangeObserversList) RegisterScaleDown(nodeGroup cloudprovider.NodeGroup, nodeName string, currentTime time.Time, ...)
- func (l *NodeGroupChangeObserversList) RegisterScaleUp(nodeGroup cloudprovider.NodeGroup, delta int, currentTime time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeGroupChangeObserver ¶
type NodeGroupChangeObserver interface { // RegisterScaleUp records scale up for a nodegroup. RegisterScaleUp(nodeGroup cloudprovider.NodeGroup, delta int, currentTime time.Time) // RegisterScaleDowns records scale down for a nodegroup. RegisterScaleDown(nodeGroup cloudprovider.NodeGroup, nodeName string, currentTime time.Time, expectedDeleteTime time.Time) // RegisterFailedScaleUp records failed scale-up for a nodegroup. // reason denotes optional reason for failed scale-up // errMsg denotes the actual error message RegisterFailedScaleUp(nodeGroup cloudprovider.NodeGroup, reason string, errMsg string, gpuResourceName, gpuType string, currentTime time.Time) // RegisterFailedScaleDown records failed scale-down for a nodegroup. RegisterFailedScaleDown(nodeGroup cloudprovider.NodeGroup, reason string, currentTime time.Time) }
NodeGroupChangeObserver is an observer of: * scale-up(s) for a nodegroup * scale-down(s) for a nodegroup * scale-up failure(s) for a nodegroup * scale-down failure(s) for a nodegroup
type NodeGroupChangeObserversList ¶
type NodeGroupChangeObserversList struct {
// contains filtered or unexported fields
}
NodeGroupChangeObserversList is a slice of observers of state of scale up/down in the cluster
func NewNodeGroupChangeObserversList ¶
func NewNodeGroupChangeObserversList() *NodeGroupChangeObserversList
NewNodeGroupChangeObserversList return empty list of scale state observers.
func (*NodeGroupChangeObserversList) Register ¶
func (l *NodeGroupChangeObserversList) Register(o NodeGroupChangeObserver)
Register adds new observer to the list.
func (*NodeGroupChangeObserversList) RegisterFailedScaleDown ¶
func (l *NodeGroupChangeObserversList) RegisterFailedScaleDown(nodeGroup cloudprovider.NodeGroup, reason string, currentTime time.Time)
RegisterFailedScaleDown records failed scale-down for a nodegroup.
func (*NodeGroupChangeObserversList) RegisterFailedScaleUp ¶
func (l *NodeGroupChangeObserversList) RegisterFailedScaleUp(nodeGroup cloudprovider.NodeGroup, reason string, errMsg, gpuResourceName, gpuType string, currentTime time.Time)
RegisterFailedScaleUp calls RegisterFailedScaleUp for each observer.
func (*NodeGroupChangeObserversList) RegisterScaleDown ¶
func (l *NodeGroupChangeObserversList) RegisterScaleDown(nodeGroup cloudprovider.NodeGroup, nodeName string, currentTime time.Time, expectedDeleteTime time.Time)
RegisterScaleDown calls RegisterScaleDown for each observer.
func (*NodeGroupChangeObserversList) RegisterScaleUp ¶
func (l *NodeGroupChangeObserversList) RegisterScaleUp(nodeGroup cloudprovider.NodeGroup, delta int, currentTime time.Time)
RegisterScaleUp calls RegisterScaleUp for each observer.