Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdmitFilterFunc ¶
type AdmitFilterFunc func(app *v1alpha1.Application) bool
AdmitFilterFunc is a function that returns true if the agent should handle a given Application
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain is a chain of filters to decide whether a change should be ignored by the agent.
func NewFilterChain ¶
func NewFilterChain() *Chain
NewFilterChain returns an instance of an empty FilterChain
func (*Chain) Admit ¶
func (fc *Chain) Admit(app *v1alpha1.Application) bool
Admit runs all admit filters in the FilterChain and returns true if the app should be admitted
func (*Chain) AppendAdmitFilter ¶
func (fc *Chain) AppendAdmitFilter(f AdmitFilterFunc)
AppendAdmitFilter appends an admit filter function to the chain
func (*Chain) AppendChangeFilter ¶
func (fc *Chain) AppendChangeFilter(f ChangeFilterFunc)
Append appends a filter function to the chain
func (*Chain) ProcessChange ¶
func (fc *Chain) ProcessChange(old, new *v1alpha1.Application) bool
ProcessChange runs all filters in the FilterChain and returns false if the change should be ignored by the agent
type ChangeFilterFunc ¶
type ChangeFilterFunc func(old *v1alpha1.Application, new *v1alpha1.Application) bool
ChangeFilterFunc is a function that compares old and new and returns false if the agent should ignore this change.