Skip to main content

Module types

Module types 

Source
Expand description

ZLayer V1 Service Specification Types

This module defines all types for parsing and validating ZLayer deployment specs.

Structs§

AccessRule
An access rule determining what a network can reach.
ApiSpec
API server configuration (embedded in deploy/up flows)
BridgeNetwork
A user-defined bridge or overlay network that containers can attach to.
BridgeNetworkAttachment
A container attached to a BridgeNetwork.
CommandSpec
Command override specification (Section 5.5)
ContainerRestartPolicy
Container-runtime-level restart policy.
DependsSpec
Dependency specification
DeploymentSpec
Top-level deployment specification
DeviceSpec
Device passthrough specification
DistributedConfig
Configuration for distributed GPU job coordination.
EndpointSpec
Endpoint specification (proxy binding)
EndpointTunnelConfig
Tunnel configuration for an endpoint
ErrorsSpec
Error handling policies
ExternalSpec
External service specification (proxy backend without a container)
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
LifecycleSpec
Lifecycle policy for service / job / cron containers.
LogsConfig
Log output configuration for services and jobs.
MetricTarget
A single custom or external metric target.
NetworkMember
A member of a network.
NetworkPolicySpec
A network policy defines an access control group with membership rules and service access policies.
NodeSelector
Node selection constraints for service placement
OverlayConfig
Overlay network configuration
OverlaySettings
Overlay network settings
PanicPolicy
Panic policy
PortMapping
A single host-to-container port publish rule (Docker’s -p).
PredictiveSpec
Predictive/proactive scaling configuration. Consumed in Phase 4.
RegistryAuth
Inline Docker/OCI registry credentials attached to a single pull request.
ReplicaGroup
One named replica group within a service.
ResourcesSpec
Resource limits (upper bounds, not reservations)
ScaleBehavior
Scale-up/scale-down velocity & stabilization behavior (HPA v2 behavior).
ScaleDirection
Velocity policy for one scaling direction.
ScalePolicy
A single rate-limit policy: at most value Pods/Percent per period.
ScaleTargets
Target metrics for adaptive scaling
ScaleTrigger
An event-driven scaling trigger (KEDA-style scaler). Consumed in Phase 2.
ServiceNetworkSpec
Per-service network configuration (overlay + join policy).
ServiceSpec
Per-service specification
ShardingSpec
Describes one node’s contiguous layer-block in a pipeline-parallel swarm.
StreamEndpointConfig
Stream (L4) proxy configuration for TCP/UDP endpoints
SwarmPeer
A peer stage in a pipeline-parallel inference swarm.
TargetPlatform
Platform a service targets. None on ServiceSpec.platform means “any agent is acceptable” (preserves backward compatibility).
TunnelAccessConfig
On-demand access settings for zlayer tunnel access
TunnelDefinition
Top-level tunnel definition (not tied to a service endpoint)
UlimitSpec
Per-process resource limit (Docker --ulimit style).
VerticalScaleSpec
Vertical (right-sizing) autoscaling configuration. Consumed in Phase 3.
WasmCapabilities
Explicit capability declarations for WASM modules. Controls which host interfaces are linked and available to the component.
WasmConfig
Comprehensive configuration for all WASM service types.
WasmHttpConfigDeprecated
Configuration for WASM HTTP services with instance pooling
WasmPreopen
Pre-opened directory for WASM filesystem access

Enums§

AccessAction
Access control action.
ArchKind
CPU architecture a service needs. Mirrors the arch half of an OCI platform.
BridgeNetworkDriver
Backing driver for a BridgeNetwork.
ContainerRestartKind
Which flavor of container restart policy to apply.
DependencyCondition
Dependency condition
ExposeType
Exposure type
FailureAction
Failure action for init steps
ForecastMethod
Forecasting method for predictive scaling.
GpuSharingMode
GPU sharing mode controlling how GPU resources are multiplexed.
GroupAffinity
Affinity hint for a single replica group’s placement.
HealthCheck
Health check type
InitFailureAction
Init failure action
IsolationMode
Container isolation mode (Windows containers only; ignored on Linux/macOS).
JoinMode
Join mode
JoinScope
Join scope
LocalhostReachability
How a service’s exposed ports are made reachable on the node’s loopback (127.0.0.1:<port>) for same-service / same-node consumers.
MemberKind
Type of network member.
MetricKind
How a metric’s value is compared against its target.
NetworkMode
Network mode for a service container.
NodeMode
How service replicas are allocated to nodes
OsKind
Operating system a service needs to run on.
PanicAction
Panic action
PolicySelect
How to combine multiple ScalePolicy entries.
PolicyType
Unit of a ScalePolicy value.
PortProtocol
Transport protocol for a published container port.
Protocol
Protocol type
PullPolicy
Image pull policy
RegistryAuthType
Authentication scheme for a RegistryAuth.
ResourceType
Resource type - determines container lifecycle
RuntimeIsolation
Selects which execution backend runs a service’s containers. Auto keeps today’s behavior (image-marker / platform.os / image-OS auto-detection). macOS: Sandbox = Seatbelt native-process sandbox; Vz = native-macOS guest VM; VzLinux = Linux-guest VZ VM; Vm = libkrun micro-VM. Honored by the macOS CompositeRuntime; ignored where it doesn’t apply.
ScaleSpec
Scaling configuration
ScaleTriggerKind
The concrete kind of an event-driven scaler.
SchedulingPolicy
Scheduling policy for GPU workloads
ServiceType
Service type - determines runtime behavior and scaling model
SourcePolicy
Per-image override for the registry resolution chain order.
StorageSpec
Storage mount specification
StorageTier
Storage performance tier
StreamHealthCheck
Health check types for stream (L4) endpoints
SwarmRole
Role of a node within a pipeline-parallel inference swarm.
TimeoutAction
Timeout action
TunnelProtocol
Protocol for tunnel connections (tcp or udp only)
VerticalMode
Vertical autoscaling operating mode.

Functions§

default_registry_auth_type
Serde default for RegistryAuth::auth_type. Kept as a free function so #[serde(default = "...")] can reference it.
validate_unique_replica_group_roles
Validate that no two ReplicaGroups share the same role within a single ServiceSpec.

Type Aliases§

InitParams
Init action parameters