Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DPUSelectFunc ¶
type DPUSelectFunc func(ctx context.Context, dpuNode *provisioningv1.DPUNode, dpus []provisioningv1.DPU) (*provisioningv1.DPU, error)
DPUSelectFunc is a function that selects a DPU from a list of candidates. The function is called with a list of candidates and should return the selected DPU. If the function cannot select a DPU, it should return nil and an error.
type DPUSelector ¶
type DPUSelector interface {
// GetDPUForNode finds single DPU for a DPUNode. If multiple DPUs are found, an error is returned.
GetDPUForNode(ctx context.Context, c client.Client, dpuNode *provisioningv1.DPUNode) (*provisioningv1.DPU, error)
// ListDPUsForNode returns a list of DPUs for a Node.
ListDPUsForNode(ctx context.Context, c client.Client, dpuNode *provisioningv1.DPUNode) ([]provisioningv1.DPU, error)
}
DPUSelector selects DPUs for nodes.
type Option ¶
type Option interface {
// Apply modifies the Options struct.
Apply(options *Options)
}
Option configures DPU selection behavior.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options holds configuration for DPU selection.
func (Options) MarshalLog ¶
MarshalLog emits a struct containing key/value pairs for logging.
type WithDPUSelectFunc ¶
type WithDPUSelectFunc struct {
SelectFunc DPUSelectFunc
}
WithDPUSelectFunc sets the dpu select function. The function is called with a list of candidates and should return the selected DPU. If the function cannot select a DPU, it should return nil and an error.
func (WithDPUSelectFunc) Apply ¶
func (o WithDPUSelectFunc) Apply(options *Options)
Apply sets the dpu select function.
type WithInNamespace ¶
type WithInNamespace struct {
Namespace string
}
WithInNamespace restricts DPU selection to specific namespace.
func (WithInNamespace) Apply ¶
func (o WithInNamespace) Apply(options *Options)
Apply sets the namespace restriction.
type WithIndexerField ¶
type WithIndexerField struct {
FieldName string
}
WithIndexerField uses indexed field for efficient DPU lookups.
func (WithIndexerField) Apply ¶
func (o WithIndexerField) Apply(options *Options)
Apply sets the indexer field name.
type WithLabelSelector ¶
WithLabelSelector filters DPUs by label selector.
func (WithLabelSelector) Apply ¶
func (o WithLabelSelector) Apply(options *Options)
Apply sets the label selector.