Skip to main content

Crate zlayer_spec

Crate zlayer_spec 

Source
Expand description

ZLayer V1 Service Specification

This crate provides types for parsing and validating ZLayer deployment specifications.

Structs§

ApiSpec
API server configuration (embedded in deploy/up flows)
CommandSpec
Command override specification (Section 5.5)
DependsSpec
Dependency specification
DeploymentSpec
Top-level deployment specification
DeviceSpec
Device passthrough specification
EndpointSpec
Endpoint specification (proxy binding)
EndpointTunnelConfig
Tunnel configuration for an endpoint
ErrorsSpec
Error handling policies
GpuSpec
GPU resource specification
HealthSpec
Health check specification
ImageSpec
Container image specification
InitFailurePolicy
Init failure policy
InitSpec
Init actions specification
InitStep
Init action step
JoinPolicy
Join policy - controls who can join a service
NetworkSpec
Network configuration
NodeSelector
Node selection constraints for service placement
OverlayConfig
Overlay network configuration
OverlaySettings
Overlay network settings
PanicPolicy
Panic policy
ResourcesSpec
Resource limits (upper bounds, not reservations)
ScaleTargets
Target metrics for adaptive scaling
ServiceSpec
Per-service specification
StreamEndpointConfig
Stream (L4) proxy configuration for TCP/UDP endpoints
TunnelAccessConfig
On-demand access settings for zlayer tunnel access
TunnelDefinition
Top-level tunnel definition (not tied to a service endpoint)
ValidationError
Validation errors for deployment specs
WasmHttpConfig
Configuration for WASM HTTP services with instance pooling

Enums§

DependencyCondition
Dependency condition
ExposeType
Exposure type
FailureAction
Failure action for init steps
HealthCheck
Health check type
InitFailureAction
Init failure action
JoinMode
Join mode
JoinScope
Join scope
NodeMode
How service replicas are allocated to nodes
PanicAction
Panic action
Protocol
Protocol type
PullPolicy
Image pull policy
ResourceType
Resource type - determines container lifecycle
ScaleSpec
Scaling configuration
ServiceType
Service type - determines runtime behavior and scaling model
SpecError
Errors that can occur when parsing or validating a spec
StorageSpec
Storage mount specification
StorageTier
Storage performance tier
StreamHealthCheck
Health check types for stream (L4) endpoints
TimeoutAction
Timeout action
TunnelProtocol
Protocol for tunnel connections (tcp or udp only)
ValidationErrorKind
The specific kind of validation error

Functions§

from_yaml_file
Parse a deployment spec from YAML file
from_yaml_str
Parse a deployment spec from YAML string
validate_cpu
Validate CPU limit
validate_cpu_option_wrapper
Wrapper for validate_cpu for use with validator crate Note: For Option fields, validator crate unwraps and passes the inner f64
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_name for 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_image_name_wrapper
Wrapper for validate_image_name for use with validator crate
validate_memory_format
Validate memory format
validate_memory_option_wrapper
Wrapper for validate_memory_format for use with validator crate Note: For Option fields, validator crate unwraps and passes &String
validate_port
Validate a port number
validate_port_wrapper
Wrapper for validate_port for 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_schedule for use with validator crate Note: For Option 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_name for 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_version for use with validator crate

Type Aliases§

InitParams
Init action parameters