ateworkervalidation

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 7 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

Overview

Package ateworkervalidation holds the declarative validation generated for the Worker RPC surface. It is a separate package, unlike controlapi where the generated code lives with the handlers, because both worker binaries (ateworker-gvisor and ateworker-microvm) implement the service in package main and share one set of rules.

Kubernetes codegen tools required this to be in doc.go, no other name will work.

+k8s:validation-gen=TypesWithSuffix=Request +k8s:validation-gen-input=go.ate.dev/substrate/internal/proto/ateworkerpb +k8s:validation-gen-scheme-registry=nil +k8s:validation-gen-deep-equal-func=ateDeepEqual

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCheckpointWorkloadRequest

func ValidateCheckpointWorkloadRequest(ctx context.Context, req *ateworkerpb.CheckpointWorkloadRequest) error

ValidateCheckpointWorkloadRequest validates req at the RPC edge.

func ValidateCustom_ActorDirs

func ValidateCustom_ActorDirs(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *ateworkerpb.ActorDirs) field.ErrorList

ValidateCustom_ActorDirs holds every directory to an absolute, clean path. Presence and length are the tags' job. The rule is the one both worker binaries applied by hand before, shared through internal/resources.

func ValidateCustom_Container

func ValidateCustom_Container(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *ateworkerpb.Container) field.ErrorList

ValidateCustom_Container holds a container's mount paths unique and non-nesting across its four mount lists, as atelet does for its single list: volumes cannot mount onto other volumes. A repeat within one list is the list key's finding and is not reported again here.

func ValidateCustom_EgressGateway_Address

func ValidateCustom_EgressGateway_Address(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *string) field.ErrorList

ValidateCustom_EgressGateway_Address holds the gateway address to the host:port shape the tunnel dials. The rule is atelet's, shared through internal/resources, so the two ends of the RPC agree on what is dialable.

func ValidateCustom_HttpGetAction_Path

func ValidateCustom_HttpGetAction_Path(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *string) field.ErrorList

ValidateCustom_HttpGetAction_Path holds a wakeup probe's path to the RFC 3986 path shape atelet already enforces, shared through internal/resources.

func ValidateCustom_VolumeMount_MountPath

func ValidateCustom_VolumeMount_MountPath(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *string) field.ErrorList

ValidateCustom_VolumeMount_MountPath holds a mount path to the clean absolute Unix path shape atelet already enforces, shared through internal/resources.

func ValidateGetWorkloadStatsRequest

func ValidateGetWorkloadStatsRequest(ctx context.Context, req *ateworkerpb.GetWorkloadStatsRequest) error

ValidateGetWorkloadStatsRequest validates req at the RPC edge.

func ValidateRestoreWorkloadRequest

func ValidateRestoreWorkloadRequest(ctx context.Context, req *ateworkerpb.RestoreWorkloadRequest) error

ValidateRestoreWorkloadRequest validates req at the RPC edge.

func ValidateRunWorkloadRequest

func ValidateRunWorkloadRequest(ctx context.Context, req *ateworkerpb.RunWorkloadRequest) error

ValidateRunWorkloadRequest validates req at the RPC edge.

func ValidateTerminateWorkloadRequest

func ValidateTerminateWorkloadRequest(ctx context.Context, req *ateworkerpb.TerminateWorkloadRequest) error

ValidateTerminateWorkloadRequest validates req at the RPC edge.

func Validate_ActorDirs

func Validate_ActorDirs(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.ActorDirs) (errs field.ErrorList)

Validate_ActorDirs validates an instance of ActorDirs according to declarative validation rules in the API schema.

func Validate_CheckpointWorkloadRequest

func Validate_CheckpointWorkloadRequest(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.CheckpointWorkloadRequest) (errs field.ErrorList)

Validate_CheckpointWorkloadRequest validates an instance of CheckpointWorkloadRequest according to declarative validation rules in the API schema.

func Validate_Container

func Validate_Container(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.Container) (errs field.ErrorList)

Validate_Container validates an instance of Container according to declarative validation rules in the API schema.

func Validate_ContainerSpec

func Validate_ContainerSpec(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.ContainerSpec) (errs field.ErrorList)

Validate_ContainerSpec validates an instance of ContainerSpec according to declarative validation rules in the API schema.

func Validate_EgressGateway

func Validate_EgressGateway(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.EgressGateway) (errs field.ErrorList)

Validate_EgressGateway validates an instance of EgressGateway according to declarative validation rules in the API schema.

func Validate_GetWorkloadStatsRequest

func Validate_GetWorkloadStatsRequest(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.GetWorkloadStatsRequest) (errs field.ErrorList)

Validate_GetWorkloadStatsRequest validates an instance of GetWorkloadStatsRequest according to declarative validation rules in the API schema.

func Validate_HttpGetAction

func Validate_HttpGetAction(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.HttpGetAction) (errs field.ErrorList)

Validate_HttpGetAction validates an instance of HttpGetAction according to declarative validation rules in the API schema.

func Validate_ResourceRequirements

func Validate_ResourceRequirements(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.ResourceRequirements) (errs field.ErrorList)

Validate_ResourceRequirements validates an instance of ResourceRequirements according to declarative validation rules in the API schema.

func Validate_Resources

func Validate_Resources(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.Resources) (errs field.ErrorList)

Validate_Resources validates an instance of Resources according to declarative validation rules in the API schema.

func Validate_RestoreWorkloadRequest

func Validate_RestoreWorkloadRequest(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.RestoreWorkloadRequest) (errs field.ErrorList)

Validate_RestoreWorkloadRequest validates an instance of RestoreWorkloadRequest according to declarative validation rules in the API schema.

func Validate_RunWorkloadRequest

func Validate_RunWorkloadRequest(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.RunWorkloadRequest) (errs field.ErrorList)

Validate_RunWorkloadRequest validates an instance of RunWorkloadRequest according to declarative validation rules in the API schema.

func Validate_TerminateWorkloadRequest

func Validate_TerminateWorkloadRequest(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.TerminateWorkloadRequest) (errs field.ErrorList)

Validate_TerminateWorkloadRequest validates an instance of TerminateWorkloadRequest according to declarative validation rules in the API schema.

func Validate_VolumeMount

func Validate_VolumeMount(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.VolumeMount) (errs field.ErrorList)

Validate_VolumeMount validates an instance of VolumeMount according to declarative validation rules in the API schema.

func Validate_WakeupProbe

func Validate_WakeupProbe(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.WakeupProbe) (errs field.ErrorList)

Validate_WakeupProbe validates an instance of WakeupProbe according to declarative validation rules in the API schema.

func Validate_WorkloadSpec

func Validate_WorkloadSpec(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ateworkerpb.WorkloadSpec) (errs field.ErrorList)

Validate_WorkloadSpec validates an instance of WorkloadSpec according to declarative validation rules in the API schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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