Documentation ¶
Index ¶
- func New(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)
- func NewFakeBalance(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)
- func NewFakeBalancePluginFncFromFake(fp *FakeBalancePlugin) pluginregistry.PluginBuilder
- func NewFakeDeschedule(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)
- func NewFakeDeschedulePluginFncFromFake(fp *FakeDeschedulePlugin) pluginregistry.PluginBuilder
- func NewFakeFilter(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)
- func NewFakeFilterPluginFncFromFake(fp *FakeFilterPlugin) pluginregistry.PluginBuilder
- func NewPluginFncFromFake(fp *FakePlugin) pluginregistry.PluginBuilder
- func SetDefaults_FakePluginArgs(obj runtime.Object)
- func ValidateFakePluginArgs(obj runtime.Object) error
- type Action
- type ActionImpl
- type BalanceAction
- type BalanceActionImpl
- type DescheduleAction
- type DescheduleActionImpl
- type FakeBalancePlugin
- type FakeBalancePluginArgs
- type FakeDeschedulePlugin
- type FakeDeschedulePluginArgs
- type FakeFilterPlugin
- type FakeFilterPluginArgs
- type FakePlugin
- func (c *FakePlugin) AddReactor(extensionPoint string, reaction ReactionFunc)
- func (d *FakePlugin) Balance(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status
- func (d *FakePlugin) Deschedule(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status
- func (d *FakePlugin) Filter(pod *v1.Pod) bool
- func (d *FakePlugin) Name() string
- func (d *FakePlugin) PreEvictionFilter(pod *v1.Pod) bool
- type FakePluginArgs
- type FilterAction
- type FilterActionImpl
- type PreEvictionFilterAction
- type PreEvictionFilterActionImpl
- type ReactionFunc
- type Reactor
- type SimpleReactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)
New builds plugin from its arguments while passing a handle
func NewFakeBalance ¶
func NewFakeBalance(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)
New builds plugin from its arguments while passing a handle
func NewFakeBalancePluginFncFromFake ¶
func NewFakeBalancePluginFncFromFake(fp *FakeBalancePlugin) pluginregistry.PluginBuilder
func NewFakeDeschedule ¶
func NewFakeDeschedule(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)
New builds plugin from its arguments while passing a handle
func NewFakeDeschedulePluginFncFromFake ¶
func NewFakeDeschedulePluginFncFromFake(fp *FakeDeschedulePlugin) pluginregistry.PluginBuilder
func NewFakeFilter ¶
func NewFakeFilter(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error)
New builds plugin from its arguments while passing a handle
func NewFakeFilterPluginFncFromFake ¶
func NewFakeFilterPluginFncFromFake(fp *FakeFilterPlugin) pluginregistry.PluginBuilder
func NewPluginFncFromFake ¶
func NewPluginFncFromFake(fp *FakePlugin) pluginregistry.PluginBuilder
func ValidateFakePluginArgs ¶
Types ¶
type Action ¶
type Action interface { Handle() frameworktypes.Handle GetExtensionPoint() string DeepCopy() Action }
type ActionImpl ¶
type ActionImpl struct {
// contains filtered or unexported fields
}
func (ActionImpl) DeepCopy ¶
func (a ActionImpl) DeepCopy() Action
func (ActionImpl) GetExtensionPoint ¶
func (a ActionImpl) GetExtensionPoint() string
func (ActionImpl) Handle ¶
func (a ActionImpl) Handle() frameworktypes.Handle
type BalanceActionImpl ¶
type BalanceActionImpl struct { ActionImpl // contains filtered or unexported fields }
func (BalanceActionImpl) CanBalance ¶
func (d BalanceActionImpl) CanBalance() bool
func (BalanceActionImpl) DeepCopy ¶
func (a BalanceActionImpl) DeepCopy() Action
func (BalanceActionImpl) Nodes ¶
func (d BalanceActionImpl) Nodes() []*v1.Node
type DescheduleAction ¶
type DescheduleActionImpl ¶
type DescheduleActionImpl struct { ActionImpl // contains filtered or unexported fields }
func (DescheduleActionImpl) CanDeschedule ¶
func (d DescheduleActionImpl) CanDeschedule() bool
func (DescheduleActionImpl) DeepCopy ¶
func (a DescheduleActionImpl) DeepCopy() Action
func (DescheduleActionImpl) Nodes ¶
func (d DescheduleActionImpl) Nodes() []*v1.Node
type FakeBalancePlugin ¶
type FakeBalancePlugin struct { PluginName string // ReactionChain is the list of reactors that will be attempted for every // request in the order they are tried. ReactionChain []Reactor // contains filtered or unexported fields }
FakeBalancePlugin is a configurable plugin used for testing
func (*FakeBalancePlugin) AddReactor ¶
func (c *FakeBalancePlugin) AddReactor(extensionPoint string, reaction ReactionFunc)
func (*FakeBalancePlugin) Balance ¶
func (d *FakeBalancePlugin) Balance(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status
func (*FakeBalancePlugin) Name ¶
func (d *FakeBalancePlugin) Name() string
Name retrieves the plugin name
type FakeBalancePluginArgs ¶
FakeBalancePluginArgs holds arguments used to configure FakeBalancePlugin plugin.
func (*FakeBalancePluginArgs) DeepCopy ¶
func (in *FakeBalancePluginArgs) DeepCopy() *FakeBalancePluginArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FakeBalancePluginArgs.
func (*FakeBalancePluginArgs) DeepCopyInto ¶
func (in *FakeBalancePluginArgs) DeepCopyInto(out *FakeBalancePluginArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FakeBalancePluginArgs) DeepCopyObject ¶
func (in *FakeBalancePluginArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FakeDeschedulePlugin ¶
type FakeDeschedulePlugin struct { PluginName string // ReactionChain is the list of reactors that will be attempted for every // request in the order they are tried. ReactionChain []Reactor // contains filtered or unexported fields }
FakeDeschedulePlugin is a configurable plugin used for testing
func (*FakeDeschedulePlugin) AddReactor ¶
func (c *FakeDeschedulePlugin) AddReactor(extensionPoint string, reaction ReactionFunc)
func (*FakeDeschedulePlugin) Deschedule ¶
func (d *FakeDeschedulePlugin) Deschedule(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status
func (*FakeDeschedulePlugin) Name ¶
func (d *FakeDeschedulePlugin) Name() string
Name retrieves the plugin name
type FakeDeschedulePluginArgs ¶
FakeDeschedulePluginArgs holds arguments used to configure FakeDeschedulePlugin plugin.
func (*FakeDeschedulePluginArgs) DeepCopy ¶
func (in *FakeDeschedulePluginArgs) DeepCopy() *FakeDeschedulePluginArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FakeDeschedulePluginArgs.
func (*FakeDeschedulePluginArgs) DeepCopyInto ¶
func (in *FakeDeschedulePluginArgs) DeepCopyInto(out *FakeDeschedulePluginArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FakeDeschedulePluginArgs) DeepCopyObject ¶
func (in *FakeDeschedulePluginArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FakeFilterPlugin ¶
type FakeFilterPlugin struct { PluginName string // ReactionChain is the list of reactors that will be attempted for every // request in the order they are tried. ReactionChain []Reactor // contains filtered or unexported fields }
FakeFilterPlugin is a configurable plugin used for testing
func (*FakeFilterPlugin) AddReactor ¶
func (c *FakeFilterPlugin) AddReactor(extensionPoint string, reaction ReactionFunc)
func (*FakeFilterPlugin) Name ¶
func (d *FakeFilterPlugin) Name() string
Name retrieves the plugin name
func (*FakeFilterPlugin) PreEvictionFilter ¶
func (d *FakeFilterPlugin) PreEvictionFilter(pod *v1.Pod) bool
type FakeFilterPluginArgs ¶
FakeFilterPluginArgs holds arguments used to configure FakeFilterPlugin plugin.
func (*FakeFilterPluginArgs) DeepCopy ¶
func (in *FakeFilterPluginArgs) DeepCopy() *FakeFilterPluginArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FakeFilterPluginArgs.
func (*FakeFilterPluginArgs) DeepCopyInto ¶
func (in *FakeFilterPluginArgs) DeepCopyInto(out *FakeFilterPluginArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FakeFilterPluginArgs) DeepCopyObject ¶
func (in *FakeFilterPluginArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FakePlugin ¶
type FakePlugin struct { PluginName string // ReactionChain is the list of reactors that will be attempted for every // request in the order they are tried. ReactionChain []Reactor // contains filtered or unexported fields }
FakePlugin is a configurable plugin used for testing
func (*FakePlugin) AddReactor ¶
func (c *FakePlugin) AddReactor(extensionPoint string, reaction ReactionFunc)
func (*FakePlugin) Balance ¶
func (d *FakePlugin) Balance(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status
func (*FakePlugin) Deschedule ¶
func (d *FakePlugin) Deschedule(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status
func (*FakePlugin) PreEvictionFilter ¶
func (d *FakePlugin) PreEvictionFilter(pod *v1.Pod) bool
type FakePluginArgs ¶
FakePluginArgs holds arguments used to configure FakePlugin plugin.
func (*FakePluginArgs) DeepCopy ¶
func (in *FakePluginArgs) DeepCopy() *FakePluginArgs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FakePluginArgs.
func (*FakePluginArgs) DeepCopyInto ¶
func (in *FakePluginArgs) DeepCopyInto(out *FakePluginArgs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FakePluginArgs) DeepCopyObject ¶
func (in *FakePluginArgs) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FilterAction ¶
type FilterActionImpl ¶
type FilterActionImpl struct {
ActionImpl
}
func (FilterActionImpl) CanFilter ¶
func (d FilterActionImpl) CanFilter() bool
func (FilterActionImpl) DeepCopy ¶
func (a FilterActionImpl) DeepCopy() Action
type PreEvictionFilterAction ¶
type PreEvictionFilterActionImpl ¶
type PreEvictionFilterActionImpl struct {
ActionImpl
}
func (PreEvictionFilterActionImpl) CanPreEvictionFilter ¶
func (d PreEvictionFilterActionImpl) CanPreEvictionFilter() bool
func (PreEvictionFilterActionImpl) DeepCopy ¶
func (a PreEvictionFilterActionImpl) DeepCopy() Action
type ReactionFunc ¶
type Reactor ¶
type Reactor interface { // Handles indicates whether or not this Reactor deals with a given // action. Handles(action Action) bool // React handles the action. It may choose to // delegate by indicated handled=false. // filter is used to store results of filter based actions React(action Action) (handled, filter bool, err error) }
Reactor is an interface to allow the composition of reaction functions.
type SimpleReactor ¶
type SimpleReactor struct { ExtensionPoint string Reaction ReactionFunc }
SimpleReactor is a Reactor. Each reaction function is attached to a given extensionPoint. "*" in either field matches everything for that value.
func (*SimpleReactor) Handles ¶
func (r *SimpleReactor) Handles(action Action) bool