wrapper

package
v0.8.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeMetricSourceCustom

func MakeMetricSourceCustom(targetMetric, targetValue string) autoscalingv1alpha1.MetricSource

MakeMetricSourceCustom creates a CUSTOM-type metric source.

func MakeMetricSourceExternal

func MakeMetricSourceExternal(
	protocolType autoscalingv1alpha1.ProtocolType,
	endpoint, path, targetMetric, targetValue string,
) autoscalingv1alpha1.MetricSource

MakeMetricSourceExternal creates an EXTERNAL-type metric source.

func MakeMetricSourcePod

func MakeMetricSourcePod(
	protocolType autoscalingv1alpha1.ProtocolType,
	port, path, targetMetric, targetValue string,
) autoscalingv1alpha1.MetricSource

MakeMetricSourcePod creates a POD-type metric source.

func MakeMetricSourceResource

func MakeMetricSourceResource(targetMetric, targetValue string) autoscalingv1alpha1.MetricSource

MakeMetricSourceResource creates a RESOURCE-type metric source (e.g., CPU, memory).

Types

type DeploymentWrapper

type DeploymentWrapper struct {
	// contains filtered or unexported fields
}

DeploymentWrapper wraps core Deployment types to provide a fluent API for test construction.

func MakeDeployment

func MakeDeployment(name, namespace string, annotations map[string]string) *DeploymentWrapper

MakeDeployment creates a new DeploymentWrapper.

func (*DeploymentWrapper) AddContainer

func (w *DeploymentWrapper) AddContainer(container corev1.Container) *DeploymentWrapper

AddContainer adds a container to the pod template.

func (*DeploymentWrapper) AddModelContainer

func (w *DeploymentWrapper) AddModelContainer(name, image string, args []string) *DeploymentWrapper

AddModelContainer adds a model container to the pod template.

func (*DeploymentWrapper) AddRuntimeContainer

func (w *DeploymentWrapper) AddRuntimeContainer(name, image string, command []string) *DeploymentWrapper

AddRuntimeContainer adds a runtime container to the pod template.

func (*DeploymentWrapper) Obj

Obj returns the pointer to the underlying Deployment object.

type KVCacheWrapper

type KVCacheWrapper struct {
	// contains filtered or unexported fields
}

KVCacheWrapper wraps core KVCache types to provide a fluent API for test construction.

func MakeKVCache

func MakeKVCache(name string) *KVCacheWrapper

MakeKVCache creates a new KVCacheWrapper with the given name.

func (*KVCacheWrapper) Annotation

func (w *KVCacheWrapper) Annotation(key, value string) *KVCacheWrapper

Annotation adds an annotation to the KVCache.

func (*KVCacheWrapper) Mode

func (w *KVCacheWrapper) Mode(mode string) *KVCacheWrapper

Mode sets the mode of the KVCache.

func (*KVCacheWrapper) Name

func (w *KVCacheWrapper) Name(name string) *KVCacheWrapper

Name sets the name of the KVCache.

func (*KVCacheWrapper) Namespace

func (w *KVCacheWrapper) Namespace(ns string) *KVCacheWrapper

Namespace sets the namespace of the KVCache.

func (*KVCacheWrapper) Obj

Obj returns the pointer to the underlying KVCache object.

func (*KVCacheWrapper) WithCache

WithCache sets the cache of the KVCache.

func (*KVCacheWrapper) WithDefaultConfiguration

func (w *KVCacheWrapper) WithDefaultConfiguration() *KVCacheWrapper

WithDefaultConfiguration sets up the KVCache with default configuration.

func (*KVCacheWrapper) WithWatcher

func (w *KVCacheWrapper) WithWatcher(watcher orchestrationapi.RuntimeSpec) *KVCacheWrapper

WithWatcher sets the watcher of the KVCache.

type ModelAdapterWrapper

type ModelAdapterWrapper struct {
	// contains filtered or unexported fields
}

ModelAdapterWrapper wraps core ModelAdapter types to provide a fluent API for test construction.

func MakeModelAdapter

func MakeModelAdapter(name string) *ModelAdapterWrapper

MakeModelAdapter creates a new ModelAdapterWrapper with the given name.

func (*ModelAdapterWrapper) ArtifactURL

func (w *ModelAdapterWrapper) ArtifactURL(url string) *ModelAdapterWrapper

ArtifactURL sets the ModelAdapter ArtifactURL.

func (*ModelAdapterWrapper) Name

Name sets the name of the ModelAdapter.

func (*ModelAdapterWrapper) Namespace

Namespace sets the namespace of the ModelAdapter.

func (*ModelAdapterWrapper) Obj

Obj returns the pointer to the underlying ModelAdapter object.

func (*ModelAdapterWrapper) PodSelector

func (w *ModelAdapterWrapper) PodSelector(selector *metav1.LabelSelector) *ModelAdapterWrapper

PodSelector sets the ModelAdapter PodSelector.

func (*ModelAdapterWrapper) Replicas

func (w *ModelAdapterWrapper) Replicas(replicas *int32) *ModelAdapterWrapper

Replicas sets the ModelAdapter Replicas.

type PodAutoscalerWrapper

type PodAutoscalerWrapper struct {
	autoscalingv1alpha1.PodAutoscaler
}

PodAutoscalerWrapper wraps PodAutoscaler to provide a fluent API for test construction.

func MakePodAutoscaler

func MakePodAutoscaler(name string) *PodAutoscalerWrapper

MakePodAutoscaler creates a new PodAutoscalerWrapper with the given name.

func (*PodAutoscalerWrapper) AddMetricSource

AddMetricSource adds a metric source to the list.

func (*PodAutoscalerWrapper) Annotations

func (w *PodAutoscalerWrapper) Annotations(annotations map[string]string) *PodAutoscalerWrapper

Annotations sets annotations on the PodAutoscaler.

func (*PodAutoscalerWrapper) Labels

func (w *PodAutoscalerWrapper) Labels(labels map[string]string) *PodAutoscalerWrapper

Labels sets labels on the PodAutoscaler.

func (*PodAutoscalerWrapper) MaxReplicas

func (w *PodAutoscalerWrapper) MaxReplicas(max int32) *PodAutoscalerWrapper

MaxReplicas sets the maximum number of replicas.

func (*PodAutoscalerWrapper) MetricSource

MetricSource sets a single metric source (replaces any existing).

func (*PodAutoscalerWrapper) MinReplicas

func (w *PodAutoscalerWrapper) MinReplicas(min int32) *PodAutoscalerWrapper

MinReplicas sets the minimum number of replicas.

func (*PodAutoscalerWrapper) Namespace

func (w *PodAutoscalerWrapper) Namespace(namespace string) *PodAutoscalerWrapper

Namespace sets the namespace of the PodAutoscaler.

func (*PodAutoscalerWrapper) Obj

Obj returns the pointer to the underlying PodAutoscaler object.

func (*PodAutoscalerWrapper) ScaleTargetRef

ScaleTargetRef sets the target resource to scale.

func (*PodAutoscalerWrapper) ScaleTargetRefWithKind

func (w *PodAutoscalerWrapper) ScaleTargetRefWithKind(kind, apiVersion, name string) *PodAutoscalerWrapper

ScaleTargetRefWithKind sets the target resource with kind, apiVersion, and name.

func (*PodAutoscalerWrapper) ScalingStrategy

ScalingStrategy sets the scaling strategy (HPA, KPA, or APA).

func (*PodAutoscalerWrapper) SubTargetSelector

func (w *PodAutoscalerWrapper) SubTargetSelector(roleName string) *PodAutoscalerWrapper

SubTargetSelector sets the sub-target selector (e.g., for role-level scaling).

type PodSetWrapper

type PodSetWrapper struct {
	// contains filtered or unexported fields
}

PodSetWrapper wraps PodSet types to provide a fluent API for test construction.

func MakePodSet

func MakePodSet(name string) *PodSetWrapper

MakePodSet creates a new PodSetWrapper with the given name.

func (*PodSetWrapper) AddCondition

func (w *PodSetWrapper) AddCondition(condition orchestrationapi.Condition) *PodSetWrapper

AddCondition adds a condition to the PodSet status.

func (*PodSetWrapper) AddContainer

func (w *PodSetWrapper) AddContainer(container corev1.Container) *PodSetWrapper

AddContainer adds a container to the pod template.

func (*PodSetWrapper) Annotations

func (w *PodSetWrapper) Annotations(annotations map[string]string) *PodSetWrapper

Annotations sets annotations on the PodSet.

func (*PodSetWrapper) Container

func (w *PodSetWrapper) Container(name, image string) *PodSetWrapper

Container creates and adds a container with basic configuration.

func (*PodSetWrapper) Labels

func (w *PodSetWrapper) Labels(labels map[string]string) *PodSetWrapper

Labels sets labels on the PodSet and its template.

func (*PodSetWrapper) Namespace

func (w *PodSetWrapper) Namespace(ns string) *PodSetWrapper

Namespace sets the namespace of the PodSet.

func (*PodSetWrapper) Obj

Obj returns the pointer to the underlying PodSet object.

func (*PodSetWrapper) Phase

Phase sets the phase of the PodSet.

func (*PodSetWrapper) PodGroupSize

func (w *PodSetWrapper) PodGroupSize(size int32) *PodSetWrapper

PodGroupSize sets the number of pods in this set.

func (*PodSetWrapper) PodTemplate

func (w *PodSetWrapper) PodTemplate(template corev1.PodTemplateSpec) *PodSetWrapper

PodTemplate sets the pod template for pods in this set.

func (*PodSetWrapper) ProgressingCondition

func (w *PodSetWrapper) ProgressingCondition(status corev1.ConditionStatus, reason, message string) *PodSetWrapper

ProgressingCondition adds a Progressing condition.

func (*PodSetWrapper) ReadyCondition

func (w *PodSetWrapper) ReadyCondition(status corev1.ConditionStatus, reason, message string) *PodSetWrapper

ReadyCondition adds a Ready condition.

func (*PodSetWrapper) ReadyPods

func (w *PodSetWrapper) ReadyPods(ready int32) *PodSetWrapper

ReadyPods sets the number of ready pods in the status.

func (*PodSetWrapper) Stateful

func (w *PodSetWrapper) Stateful(stateful bool) *PodSetWrapper

Stateful sets whether pods should have stable network identities.

func (*PodSetWrapper) Status

Status sets the status of the PodSet.

func (*PodSetWrapper) TotalPods

func (w *PodSetWrapper) TotalPods(total int32) *PodSetWrapper

TotalPods sets the total number of pods in the status.

type RoleSetWrapper

type RoleSetWrapper struct {
	// contains filtered or unexported fields
}

RoleSetWrapper wraps core RoleSet types to provide a fluent API for test construction.

func MakeRoleSet

func MakeRoleSet(name string) *RoleSetWrapper

MakeRoleSet creates a new RoleSetWrapper with the given name and namespace.

func (*RoleSetWrapper) Annotation

func (w *RoleSetWrapper) Annotation(key, value string) *RoleSetWrapper

Annotation adds an annotation to the RoleSet.

func (*RoleSetWrapper) Label

func (w *RoleSetWrapper) Label(key, value string) *RoleSetWrapper

Label adds a label to the RoleSet.

func (*RoleSetWrapper) Name

func (w *RoleSetWrapper) Name(name string) *RoleSetWrapper

Name sets the name of the RoleSet.

func (*RoleSetWrapper) Namespace

func (w *RoleSetWrapper) Namespace(ns string) *RoleSetWrapper

Namespace sets the namespace of the RoleSet.

func (*RoleSetWrapper) Obj

Obj returns the pointer to the underlying RoleSet object.

func (*RoleSetWrapper) SchedulingStrategyPodGroup

func (w *RoleSetWrapper) SchedulingStrategyPodGroup(pgSpec *schedv1alpha1.PodGroupSpec) *RoleSetWrapper

SchedulingStrategyPodGroup sets the PodGroup scheduling strategy. This allows integration with kube-batchd or volcano for gang scheduling.

func (*RoleSetWrapper) UpdateStrategy

UpdateStrategy sets the RoleSet update strategy (Parallel, Sequential, Interleave).

func (*RoleSetWrapper) WithRole

func (w *RoleSetWrapper) WithRole(roleName string, replicas int32, podGroupSize int32,
	template corev1.PodTemplateSpec) *RoleSetWrapper

WithRole adds a RoleSpec to the RoleSet.

func (*RoleSetWrapper) WithRoleAdvanced

func (w *RoleSetWrapper) WithRoleAdvanced(role orchestrationapi.RoleSpec) *RoleSetWrapper

WithRoleAdvanced allows full customization of a RoleSpec.

func (*RoleSetWrapper) WithRoles

func (w *RoleSetWrapper) WithRoles(roles []orchestrationapi.RoleSpec) *RoleSetWrapper

WithRoles replaces all roles in the RoleSet.

type StormServiceWrapper

type StormServiceWrapper struct {
	// contains filtered or unexported fields
}

StormServiceWrapper wraps core StormService types to provide a fluent API for test construction.

func MakeStormService

func MakeStormService(name string) *StormServiceWrapper

MakeStormService creates a new StormServiceWrapper with the given name.

func (*StormServiceWrapper) Annotations

func (w *StormServiceWrapper) Annotations(annotations map[string]string) *StormServiceWrapper

Annotations sets the annotations of the StormService.

func (*StormServiceWrapper) Mode added in v0.8.0

Mode sets the deployment mode of the StormService.

func (*StormServiceWrapper) Name

Name sets the name of the StormService.

func (*StormServiceWrapper) Namespace

Namespace sets the namespace of the StormService.

func (*StormServiceWrapper) Obj

Obj returns the pointer to the underlying StormService object.

func (*StormServiceWrapper) Replicas

func (w *StormServiceWrapper) Replicas(replicas *int32) *StormServiceWrapper

Replicas sets the replicas of the StormService.

func (*StormServiceWrapper) RoleSetTemplateMeta

func (w *StormServiceWrapper) RoleSetTemplateMeta(metadata metav1.ObjectMeta,
	roleSetSpec *orchestrationapi.RoleSetSpec) *StormServiceWrapper

func (*StormServiceWrapper) Selector

Selector sets the selector of the StormService.

func (*StormServiceWrapper) Stateful

func (w *StormServiceWrapper) Stateful(stateful bool) *StormServiceWrapper

Stateful sets the stateful flag of the StormService.

func (*StormServiceWrapper) Template

Template sets the template of the StormService.

func (*StormServiceWrapper) UpdateStrategy

UpdateStrategy sets the update strategy of the StormService.

func (*StormServiceWrapper) UpdateStrategyType

UpdateStrategyType sets the StormService update strategy type.

func (*StormServiceWrapper) WithBasicTemplate

func (w *StormServiceWrapper) WithBasicTemplate() *StormServiceWrapper

WithBasicTemplate creates a basic template with common settings.

func (*StormServiceWrapper) WithDefaultConfiguration

func (w *StormServiceWrapper) WithDefaultConfiguration() *StormServiceWrapper

WithDefaultConfiguration sets up the StormService with default configuration.

func (*StormServiceWrapper) WithMasterRole

func (w *StormServiceWrapper) WithMasterRole() *StormServiceWrapper

WithMasterRole adds a master role to the StormService.

func (*StormServiceWrapper) WithRole added in v0.6.0

func (w *StormServiceWrapper) WithRole(name string, stateful bool, podGroupSize *int32) *StormServiceWrapper

func (*StormServiceWrapper) WithSidecarInjection

func (w *StormServiceWrapper) WithSidecarInjection(runtimeImage string) *StormServiceWrapper

WithSidecarInjection adds sidecar containers to all roles.

func (*StormServiceWrapper) WithWorkerRole

func (w *StormServiceWrapper) WithWorkerRole() *StormServiceWrapper

WithWorkerRole adds a worker role to the StormService.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL