Documentation ¶
Index ¶
- Variables
- func FilterForController(ctx context.Context, c client.Client, states []kueue.AdmissionCheckState, ...) ([]string, error)
- func IndexerByConfigFunction(ControllerName string, gvk schema.GroupVersionKind) client.IndexerFunc
- type ConfigHelper
- func (ch *ConfigHelper[PtrT, T]) ConfigByName(ctx context.Context, name string) (PtrT, error)
- func (ch *ConfigHelper[PtrT, T]) ConfigForAdmissionCheck(ctx context.Context, checkName string) (PtrT, error)
- func (ch *ConfigHelper[PtrT, T]) ConfigFromRef(ctx context.Context, ref *kueue.AdmissionCheckParametersReference) (PtrT, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilParametersRef = errors.New("missing parameters reference") ErrBadParametersRef = errors.New("bad parameters reference") )
Functions ¶
func FilterForController ¶
func FilterForController(ctx context.Context, c client.Client, states []kueue.AdmissionCheckState, ControllerName string) ([]string, error)
FilterForController - returns a list of check names controlled by ControllerName.
func IndexerByConfigFunction ¶
func IndexerByConfigFunction(ControllerName string, gvk schema.GroupVersionKind) client.IndexerFunc
Types ¶
type ConfigHelper ¶
type ConfigHelper[PtrT objAsPtr[T], T any] struct { // contains filtered or unexported fields }
func NewConfigHelper ¶
func NewConfigHelper[PtrT objAsPtr[T], T any](c client.Client) (*ConfigHelper[PtrT, T], error)
func (*ConfigHelper[PtrT, T]) ConfigByName ¶
func (ch *ConfigHelper[PtrT, T]) ConfigByName(ctx context.Context, name string) (PtrT, error)
ConfigByName - get the config identified by its name
func (*ConfigHelper[PtrT, T]) ConfigForAdmissionCheck ¶
func (ch *ConfigHelper[PtrT, T]) ConfigForAdmissionCheck(ctx context.Context, checkName string) (PtrT, error)
ConfigForAdmissionCheck - get the configuration of the admission check identified by its name if it uses the helpers configuration type.
func (*ConfigHelper[PtrT, T]) ConfigFromRef ¶
func (ch *ConfigHelper[PtrT, T]) ConfigFromRef(ctx context.Context, ref *kueue.AdmissionCheckParametersReference) (PtrT, error)
ConfigFromRef - get the config identified by ref if valid.
Click to show internal directories.
Click to hide internal directories.