Documentation ¶
Index ¶
- type ModelClient
- func (s *ModelClient) ListAllModels(ctx context.Context) ([]kubeaiv1.Model, error)
- func (c *ModelClient) LookupModel(ctx context.Context, model, adapter string, labelSelectors []string) (*kubeaiv1.Model, error)
- func (c *ModelClient) Scale(ctx context.Context, model *kubeaiv1.Model, replicas int32, ...) error
- func (c *ModelClient) ScaleAtLeastOneReplica(ctx context.Context, model string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelClient ¶
type ModelClient struct {
// contains filtered or unexported fields
}
func NewModelClient ¶
func NewModelClient(client client.Client, namespace string) *ModelClient
func (*ModelClient) ListAllModels ¶
func (*ModelClient) LookupModel ¶
func (c *ModelClient) LookupModel(ctx context.Context, model, adapter string, labelSelectors []string) (*kubeaiv1.Model, error)
LookupModel checks if a model exists and matches the given label selectors.
func (*ModelClient) Scale ¶
func (c *ModelClient) Scale(ctx context.Context, model *kubeaiv1.Model, replicas int32, requiredConsecutiveScaleDowns int) error
Scale scales the model to the desired number of replicas, enforcing the min and max replica bounds. Model should have .Spec defined before calling Scale().
func (*ModelClient) ScaleAtLeastOneReplica ¶
func (c *ModelClient) ScaleAtLeastOneReplica(ctx context.Context, model string) error
Click to show internal directories.
Click to hide internal directories.