Expand description
Validation functions for ZLayer deployment specifications
This module provides validators for all spec fields with proper error reporting.
Functions§
- validate_
cpu - Validate CPU limit
- validate_
cpu_ option_ wrapper - Wrapper for
validate_cpufor use with validator crate Note: ForOption<f64>fields, validator crate unwraps and passes the innerf64 - validate_
cron_ schedules - Validate schedule/rtype consistency for all services
- validate_
dependencies - Validate that all dependency service references exist
- validate_
deployment_ name - Validate a deployment name
- validate_
deployment_ name_ wrapper - Wrapper for
validate_deployment_namefor use with validator crate - validate_
endpoint_ tunnel_ config - Validate an
EndpointTunnelConfig - validate_
env_ vars - Validate all environment variable values in a service spec
- validate_
image_ name - Validate an image name
- validate_
memory_ format - Validate memory format
- validate_
memory_ option_ wrapper - Wrapper for
validate_memory_formatfor use with validator crate Note: ForOption<String>fields, validator crate unwraps and passes&String - validate_
port - Validate a port number
- validate_
port_ wrapper - Wrapper for
validate_portfor use with validator crate Note: validator crate passes primitive types by value for custom validators - validate_
scale_ range - Validate scale range
- validate_
scale_ spec - Validate scale range (min <= max) for
ScaleSpec - validate_
schedule_ wrapper - Wrapper for
validate_cron_schedulefor use with validator crate Note: ForOption<String>fields, validator crate unwraps and passes&String - validate_
secret_ reference - Validate a secret reference name format
- validate_
service_ schedule - Validate schedule/rtype consistency for a single service
- validate_
storage_ name - Validate storage name format (lowercase alphanumeric with hyphens)
- validate_
storage_ name_ wrapper - Wrapper for
validate_storage_namefor use with validator crate - validate_
tunnel_ access_ config - Validate a
TunnelAccessConfig - validate_
tunnel_ definition - Validate a top-level
TunnelDefinition - validate_
tunnel_ ttl - Validate tunnel TTL format (e.g., “4h”, “30m”, “1d”)
- validate_
tunnels - Validate all tunnels in a deployment spec
- validate_
unique_ endpoints - Validate that endpoint names are unique within a service
- validate_
unique_ service_ endpoints - Validate that each service has unique endpoint names
- validate_
version - Validate that the version is “v1”
- validate_
version_ wrapper - Wrapper for
validate_versionfor use with validator crate - validate_
wasm_ config - Validate WASM configuration for a single service
- validate_
wasm_ configs - Validate WASM configuration for all services in a deployment spec