pub struct WorkerService { /* private fields */ }Expand description
WorkerService handles requests from the canonical worker contract.
Implements the RequestService trait for integration with hyprstream’s Cap’n Proto bridged RPC transport (inproc/UDS/systemd-fd + QUIC/Iroh); ZMQ is gone.
Implementations§
Source§impl WorkerService
impl WorkerService
Sourcepub fn new(
pool_config: PoolConfig,
backend: Arc<dyn SandboxBackend>,
image_store: Option<Arc<dyn ImageStore>>,
transport: TransportConfig,
signing_key: SigningKey,
) -> AnyhowResult<Self>
pub fn new( pool_config: PoolConfig, backend: Arc<dyn SandboxBackend>, image_store: Option<Arc<dyn ImageStore>>, transport: TransportConfig, signing_key: SigningKey, ) -> AnyhowResult<Self>
Create a new WorkerService with full configuration and infrastructure
Must be called from within a tokio runtime context.
Set the authorization callback for policy checks.
Sourcepub fn set_expected_audience(&mut self, audience: String)
pub fn set_expected_audience(&mut self, audience: String)
Set the expected JWT audience for token validation.
Sourcepub fn set_jwt_key_source(&mut self, src: Arc<dyn JwtKeySource>)
pub fn set_jwt_key_source(&mut self, src: Arc<dyn JwtKeySource>)
Set the JWT key source for verifying JWTs (local and federated).
Sourcepub async fn initialize(&self) -> Result<()>
pub async fn initialize(&self) -> Result<()>
Initialize the service (start warm pool)
Sourcepub async fn version(&self, _version: &str) -> Result<VersionInfo>
pub async fn version(&self, _version: &str) -> Result<VersionInfo>
Get runtime version information
Sourcepub async fn status(&self, verbose: bool) -> Result<StatusResponse>
pub async fn status(&self, verbose: bool) -> Result<StatusResponse>
Get runtime status
Sourcepub async fn run_pod_sandbox(
&self,
subject: &Subject,
config: &PodSandboxConfig,
) -> Result<String>
pub async fn run_pod_sandbox( &self, subject: &Subject, config: &PodSandboxConfig, ) -> Result<String>
Create and start a pod sandbox (Kata VM)
subject is the cryptographically-verified caller identity (#525 P2
admission control) — derive it from ctx.subject() at the RPC
dispatch boundary (see handle_run), never accept a caller-asserted
subject as a plain parameter (see the MAC interface policy: “derive,
don’t extend”).
Sourcepub async fn stop_pod_sandbox(&self, pod_sandbox_id: &str) -> Result<()>
pub async fn stop_pod_sandbox(&self, pod_sandbox_id: &str) -> Result<()>
Stop a running pod sandbox
Sourcepub async fn remove_pod_sandbox(&self, pod_sandbox_id: &str) -> Result<()>
pub async fn remove_pod_sandbox(&self, pod_sandbox_id: &str) -> Result<()>
Remove a pod sandbox
Sourcepub async fn pod_sandbox_status(
&self,
pod_sandbox_id: &str,
verbose: bool,
) -> Result<(PodSandboxStatus, Vec<KeyValue>)>
pub async fn pod_sandbox_status( &self, pod_sandbox_id: &str, verbose: bool, ) -> Result<(PodSandboxStatus, Vec<KeyValue>)>
Get pod sandbox status
Returns the runtime PodSandboxStatus (has ToCapnp for handler serialization) plus verbose info as KeyValue for the wire format.
Sourcepub async fn list_pod_sandbox(
&self,
filter: &PodSandboxFilter,
) -> Result<Vec<PodSandboxInfo>>
pub async fn list_pod_sandbox( &self, filter: &PodSandboxFilter, ) -> Result<Vec<PodSandboxInfo>>
List pod sandboxes matching the given filter.
Empty string fields mean “no filter”. State filtering is not supported over the wire (Cap’n Proto enum defaults make it ambiguous).
Sourcepub async fn create_container(
&self,
pod_sandbox_id: &str,
config: &ContainerConfig,
_sandbox_config: &PodSandboxConfig,
) -> Result<String>
pub async fn create_container( &self, pod_sandbox_id: &str, config: &ContainerConfig, _sandbox_config: &PodSandboxConfig, ) -> Result<String>
Create a container within a pod sandbox (host-level, no guest agent)
In host-level mode, creating a container means:
- Verify the sandbox (VM) exists and is ready
- Ensure the container image is available via RAFS
- Track container metadata for lifecycle management
The container’s rootfs will be accessible to the VM via virtiofs.
Sourcepub async fn start_container(&self, container_id: &str) -> Result<()>
pub async fn start_container(&self, container_id: &str) -> Result<()>
Start a created container (host-level, no guest agent)
In host-level mode, “starting” a container means:
- The container’s image rootfs is accessible via virtiofs
- The VM is running and can access the filesystem
- No guest agent required - VM manages its own processes
Sourcepub async fn stop_container(
&self,
container_id: &str,
_timeout: i64,
) -> Result<()>
pub async fn stop_container( &self, container_id: &str, _timeout: i64, ) -> Result<()>
Stop a running container (host-level, no guest agent)
In host-level mode, “stopping” a container means:
- Mark the container as exited
- The VM continues running (sandbox lifecycle is separate)
- Optionally remove container-specific resources
Sourcepub async fn remove_container(&self, container_id: &str) -> Result<()>
pub async fn remove_container(&self, container_id: &str) -> Result<()>
Remove a container
Sourcepub async fn container_status(
&self,
container_id: &str,
verbose: bool,
) -> Result<(ContainerStatus, Vec<KeyValue>)>
pub async fn container_status( &self, container_id: &str, verbose: bool, ) -> Result<(ContainerStatus, Vec<KeyValue>)>
Get container status
Returns the runtime ContainerStatus (has ToCapnp for handler serialization) plus verbose info as KeyValue for the wire format.
Sourcepub async fn list_containers(
&self,
filter: &ContainerFilter,
) -> Result<Vec<ContainerInfo>>
pub async fn list_containers( &self, filter: &ContainerFilter, ) -> Result<Vec<ContainerInfo>>
List containers matching the given filter.
Empty string fields mean “no filter”. State filtering is not supported over the wire (Cap’n Proto enum defaults make it ambiguous).
Sourcepub async fn exec_sync(
&self,
caller: &Subject,
container_id: &str,
cmd: &[String],
timeout: i64,
) -> Result<ExecSyncResult>
pub async fn exec_sync( &self, caller: &Subject, container_id: &str, cmd: &[String], timeout: i64, ) -> Result<ExecSyncResult>
Execute a command in a container through the shared task-owned stdio
adapter. The caller is the verified RPC subject, never a request field;
ExecMount compares it with the subject bound when the sandbox was
admitted before invoking the backend.
Sourcepub async fn pod_sandbox_stats(
&self,
pod_sandbox_id: &str,
) -> Result<PodSandboxStats>
pub async fn pod_sandbox_stats( &self, pod_sandbox_id: &str, ) -> Result<PodSandboxStats>
Get pod sandbox stats
Sourcepub async fn list_pod_sandbox_stats(
&self,
filter: &PodSandboxStatsFilter,
) -> Result<Vec<PodSandboxStats>>
pub async fn list_pod_sandbox_stats( &self, filter: &PodSandboxStatsFilter, ) -> Result<Vec<PodSandboxStats>>
List pod sandbox stats matching the given filter.
Sourcepub async fn container_stats(
&self,
container_id: &str,
) -> Result<ContainerStats>
pub async fn container_stats( &self, container_id: &str, ) -> Result<ContainerStats>
Get container stats
Sourcepub async fn list_container_stats(
&self,
filter: &ContainerStatsFilter,
) -> Result<Vec<ContainerStats>>
pub async fn list_container_stats( &self, filter: &ContainerStatsFilter, ) -> Result<Vec<ContainerStats>>
List container stats matching the given filter.
Sourcepub async fn prepare_attach(
&self,
ctx: &EnvelopeContext,
container_id: &str,
) -> Result<(StreamInfo, Continuation)>
pub async fn prepare_attach( &self, ctx: &EnvelopeContext, container_id: &str, ) -> Result<(StreamInfo, Continuation)>
Attach to a container’s terminal I/O streams (tmux-like)
Performs DH key exchange and pre-authorization atomically via StreamChannel. The stream is immediately ready — no separate start_fd_stream() call needed.
§Flow
- Client calls attach() with ephemeral pubkey in envelope
- Server does DH + pre-auth + prepares streaming
- REP is sent with StreamInfo (stream_id, endpoint, server_pubkey)
- Continuation spawns the FD streaming task AFTER client receives REP
- Client derives topic/mac_key from DH shared secret and subscribes
Trait Implementations§
Source§impl ContainerHandler for WorkerService
impl ContainerHandler for WorkerService
Source§fn handle_create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 CreateContainerRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 CreateContainerRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_stop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 StopContainerRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_stop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 StopContainerRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 ContainerStatusRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<ContainerStatusResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 ContainerStatusRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<ContainerStatusResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ContainerFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<ContainerInfo>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ContainerFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<ContainerInfo>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<ContainerStats>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<ContainerStats>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_list_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ContainerStatsFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<ContainerStats>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_list_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ContainerStatsFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<ContainerStats>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_exec<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ExecSyncRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<ExecSyncResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_exec<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ExecSyncRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<ExecSyncResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_attach<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 AttachRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_attach<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 AttachRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<(StreamInfo, Continuation)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
attach request.Source§fn handle_detach<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_detach<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
detach request.Source§impl ImageHandler for WorkerService
impl ImageHandler for WorkerService
Source§fn handle_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
filter: &'life2 ImageFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<ImageInfo>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
filter: &'life2 ImageFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<ImageInfo>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 ImageStatusRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<ImageStatusResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 ImageStatusRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<ImageStatusResult>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_pull<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PullImageRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_pull<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PullImageRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ImageSpec,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ImageSpec,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_fs_info<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<FilesystemUsage>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_fs_info<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<FilesystemUsage>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl RequestService for WorkerService
impl RequestService for WorkerService
Source§fn decode_request_body(&self, signed_body: &[u8]) -> Result<DecodedRequestBody>
fn decode_request_body(&self, signed_body: &[u8]) -> Result<DecodedRequestBody>
Source§fn producer_reach_config_handle(&self) -> Option<ProducerReachConfigHandle>
fn producer_reach_config_handle(&self) -> Option<ProducerReachConfigHandle>
Source§fn moq_origin_handle(&self) -> Option<MoqStreamOriginHandle>
fn moq_origin_handle(&self) -> Option<MoqStreamOriginHandle>
Source§fn handle_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
body: &'life2 DecodedRequestBody,
) -> Pin<Box<dyn Future<Output = AnyhowResult<(Vec<u8>, Option<Continuation>)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
body: &'life2 DecodedRequestBody,
) -> Pin<Box<dyn Future<Output = AnyhowResult<(Vec<u8>, Option<Continuation>)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn transport(&self) -> &TransportConfig
fn transport(&self) -> &TransportConfig
Source§fn signing_key(&self) -> SigningKey
fn signing_key(&self) -> SigningKey
Source§fn expected_audience(&self) -> Option<&str>
fn expected_audience(&self) -> Option<&str>
Source§fn jwt_key_source(&self) -> Option<Arc<dyn JwtKeySource>>
fn jwt_key_source(&self) -> Option<Arc<dyn JwtKeySource>>
Source§fn pq_signing_key(&self) -> Option<SigningKey<MlDsa65>>
fn pq_signing_key(&self) -> Option<SigningKey<MlDsa65>>
None makes process_request fail closed
before dispatch; it never selects an EdDSA-only response. The matching ML-DSA-65 public key
must be anchored in the client’s PQ trust store for Hybrid verification
to succeed (peer attestation). Read moreSource§fn verifying_key(&self) -> VerifyingKey
fn verifying_key(&self) -> VerifyingKey
Source§fn delegated_user_audience(
&self,
_signer_pubkey: &[u8; 32],
_untrusted_aud: Option<&str>,
) -> Option<&str>
fn delegated_user_audience( &self, _signer_pubkey: &[u8; 32], _untrusted_aud: Option<&str>, ) -> Option<&str>
expected_audience instead.Source§fn accept_delegated_resource_leaf(
&self,
_ctx: &EnvelopeContext,
_body: &DecodedRequestBody,
) -> bool
fn accept_delegated_resource_leaf( &self, _ctx: &EnvelopeContext, _body: &DecodedRequestBody, ) -> bool
Source§fn require_cnf_binding(&self) -> bool
fn require_cnf_binding(&self) -> bool
cnf key binding (jwk or jkt). Read moreSource§fn credential_revocation_store(&self) -> Option<&dyn CredentialRevocationStore>
fn credential_revocation_store(&self) -> Option<&dyn CredentialRevocationStore>
Source§fn jwt_verify_policy(&self) -> CryptoPolicy
fn jwt_verify_policy(&self) -> CryptoPolicy
Source§fn resolve_key_subject(&self, signer_pubkey: &[u8; 32]) -> Option<Subject>
fn resolve_key_subject(&self, signer_pubkey: &[u8; 32]) -> Option<Subject>
Source§fn cache_key_binding(
&self,
_verifying_key: VerifyingKey,
_subject: &str,
_jwt: &str,
_expires_at: i64,
)
fn cache_key_binding( &self, _verifying_key: VerifyingKey, _subject: &str, _jwt: &str, _expires_at: i64, )
Source§fn accept_delegated_bearer(&self, _signer_pubkey: &[u8; 32]) -> bool
fn accept_delegated_bearer(&self, _signer_pubkey: &[u8; 32]) -> bool
Source§fn accept_deferred_federate_credential(&self) -> bool
fn accept_deferred_federate_credential(&self) -> bool
Source§fn admit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_body: &'life2 DecodedRequestBody,
_proof: &'life3 ParsedProof,
) -> Pin<Box<dyn Future<Output = Result<(VerifiedProof, [u8; 32], String, String, ProofReplayKey, u64), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn admit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_body: &'life2 DecodedRequestBody,
_proof: &'life3 ParsedProof,
) -> Pin<Box<dyn Future<Output = Result<(VerifiedProof, [u8; 32], String, String, ProofReplayKey, u64), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
commit_deferred_federate_request only after those gates pass.Source§fn commit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_resource: &'life2 str,
_operation: &'life3 str,
_replay_key: &'life4 ProofReplayKey,
_replay_expiry: u64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn commit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_resource: &'life2 str,
_operation: &'life3 str,
_replay_key: &'life4 ProofReplayKey,
_replay_expiry: u64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Source§fn verify_internal_work_bearer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_token: &'life2 str,
_protected: &'life3 ProtectedHeader,
) -> Pin<Box<dyn Future<Output = Result<InternalWorkClaims, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn verify_internal_work_bearer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_token: &'life2 str,
_protected: &'life3 ProtectedHeader,
) -> Pin<Box<dyn Future<Output = Result<InternalWorkClaims, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
iw+jwt internal execution work order presented as the
direct JWT (single-service Model→Inference boundary, user-approved D5). Read moreSource§impl RuntimeHandler for WorkerService
impl RuntimeHandler for WorkerService
Source§fn handle_version<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<VersionInfo>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_version<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<VersionInfo>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 StatusRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<RuntimeStatus>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 StatusRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<RuntimeStatus>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§impl SandboxHandler for WorkerService
impl SandboxHandler for WorkerService
Source§fn handle_run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PodSandboxConfig,
) -> Pin<Box<dyn Future<Output = AnyhowResult<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PodSandboxConfig,
) -> Pin<Box<dyn Future<Output = AnyhowResult<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_stop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_stop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 PodSandboxStatusRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<PodSandboxStatusResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
request: &'life2 PodSandboxStatusRequest,
) -> Pin<Box<dyn Future<Output = AnyhowResult<PodSandboxStatusResponse>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PodSandboxFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<PodSandboxInfo>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PodSandboxFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<PodSandboxInfo>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<PodSandboxStats>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AnyhowResult<PodSandboxStats>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn handle_list_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
filter: &'life2 PodSandboxStatsFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<PodSandboxStats>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_list_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
filter: &'life2 PodSandboxStatsFilter,
) -> Pin<Box<dyn Future<Output = AnyhowResult<Vec<PodSandboxStats>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§impl WorkerHandler for WorkerService
Super-trait with authorization — all scope traits are implemented above.
impl WorkerHandler for WorkerService
Super-trait with authorization — all scope traits are implemented above.
Auto Trait Implementations§
impl !Freeze for WorkerService
impl !RefUnwindSafe for WorkerService
impl Send for WorkerService
impl Sync for WorkerService
impl Unpin for WorkerService
impl UnsafeUnpin for WorkerService
impl !UnwindSafe for WorkerService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more