Documentation ¶
Index ¶
- type ProcessorCallbacks
- type TestProcessorCallbacks
- func (callbacks *TestProcessorCallbacks) DisableScaleDownForLoop()
- func (callbacks *TestProcessorCallbacks) GetExtraValue(key string) (value interface{}, found bool)
- func (callbacks *TestProcessorCallbacks) Reset()
- func (callbacks *TestProcessorCallbacks) ResetUnneededNodes()
- func (callbacks *TestProcessorCallbacks) SetExtraValue(key string, value interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcessorCallbacks ¶
type ProcessorCallbacks interface { // DisableScaleDownForLoop disables scale down for current loop iteration DisableScaleDownForLoop() // ResetUnneededNodes resets information about any nodes that were previously considered unneeded by scale-down logic. // CA will only delete a node if it's unneeded (meets criteria for scale-down) for time specified // via --scale-down-unneeded-time. This call resets the timer for all the nodes in the cluster. ResetUnneededNodes() // SetExtraValue sets arbitrary value for given key. Value storage will be reset at the beginning of each loop iteration. // Arbitrary value storage is used to pass information between processors used in extension points. SetExtraValue(key string, value interface{}) // GetExtraValue gets arbitrary value for given key. If value for given key is not found, found=false will be returned. GetExtraValue(key string) (value interface{}, found bool) }
ProcessorCallbacks is interface defining extra callback methods which can be called by processors used in extension points.
type TestProcessorCallbacks ¶
type TestProcessorCallbacks struct { // ScaleDownDisabledForLoop marks if scaledown should be disabled for loop ScaleDownDisabledForLoop bool // ExtraValues stores values set by GetExtraValue ExtraValues map[string]interface{} }
TestProcessorCallbacks is test implementation of ProcessorCallbacks
func NewTestProcessorCallbacks ¶
func NewTestProcessorCallbacks() *TestProcessorCallbacks
NewTestProcessorCallbacks creates new instance of TestProcessorCallbacks
func (*TestProcessorCallbacks) DisableScaleDownForLoop ¶
func (callbacks *TestProcessorCallbacks) DisableScaleDownForLoop()
DisableScaleDownForLoop is implementation of ProcessorCallbacks.DisableScaleDownForLoop
func (*TestProcessorCallbacks) GetExtraValue ¶
func (callbacks *TestProcessorCallbacks) GetExtraValue(key string) (value interface{}, found bool)
GetExtraValue is implementation of ProcessorCallbacks.GetExtraValue
func (*TestProcessorCallbacks) Reset ¶
func (callbacks *TestProcessorCallbacks) Reset()
Reset resets TestProcessorCallbacks
func (*TestProcessorCallbacks) ResetUnneededNodes ¶
func (callbacks *TestProcessorCallbacks) ResetUnneededNodes()
ResetUnneededNodes is test implementation, which takes no action
func (*TestProcessorCallbacks) SetExtraValue ¶
func (callbacks *TestProcessorCallbacks) SetExtraValue(key string, value interface{})
SetExtraValue is implementation of ProcessorCallbacks.SetExtraValue
Click to show internal directories.
Click to hide internal directories.