pub trait DeployApi: Send + Sync {
Show 16 methods
// Required methods
fn resource_names<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ResourceName>, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn resource_list<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
q: &'life3 ListQuery,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ResourceRecord>, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn resource_find<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
name: &'life3 str,
collection: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<ResourceRecord, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn resource_singleton<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
collection: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<ResourceRecord, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn resource_create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
items: &'life3 [ResourceCreate],
) -> Pin<Box<dyn Future<Output = Result<MutationOutcome, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn resource_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
items: &'life3 [ResourceUpdate],
) -> Pin<Box<dyn Future<Output = Result<MutationOutcome, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn scan_lock_acquire<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
acquire_s: u64,
hold_s: u64,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn scan_lock_info<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<LockObservation, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn scan_status<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<ScanStatus, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn scan_request<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn modes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ModeRecord>, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn mode_create<'life0, 'life1, 'async_trait>(
&'life0 self,
body: &'life1 ModeCreate,
) -> Pin<Box<dyn Future<Output = Result<ModeRecord, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn deployment_mode<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn restart_pending<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn redundancy_resync<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn secret_names<'life0, 'life1, 'async_trait>(
&'life0 self,
provider: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SecretNameListing, CoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The deploy-facing gateway calls. Not part of super::GatewayApi.
Required Methods§
Sourcefn resource_names<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ResourceName>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resource_names<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ResourceName>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List the names of a resource type (resource_names, capture
C-list “GET names”): each item carries the collections (modes)
that hold it. The answer is the {items, metadata} envelope; a
type with no resources is Ok with no items. Gateway order is kept.
Sourcefn resource_list<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
q: &'life3 ListQuery,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ResourceRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resource_list<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
q: &'life3 ListQuery,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ResourceRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
List the resources of a type (resource_list, capture C-list “GET
list”). Decision D7: this sees the EFFECTIVE view only, one item per
name, so a shadowed collection cannot be listed here; use
resource_list_in_collection for that. The gateway reads a filter
as its own field[op]=value parameter, so q.filter must be of
that form (see config_resources::list_query_pairs). Gateway order
is kept.
Sourcefn resource_find<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
name: &'life3 str,
collection: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<ResourceRecord, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn resource_find<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
name: &'life3 str,
collection: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<ResourceRecord, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Read one resource by name (resource_find, captures C3a / C-list).
None sends no collection parameter and reads the effective view;
Some(c) sends exactly collection=c and reads that copy. The two
carry different signatures (D7). An absent name is not_found.
Sourcefn resource_singleton<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
collection: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<ResourceRecord, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resource_singleton<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
collection: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<ResourceRecord, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read a singleton resource (resource_singleton, capture C-list
“GET singleton”), from the effective view or from collection.
Sourcefn resource_create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
items: &'life3 [ResourceCreate],
) -> Pin<Box<dyn Future<Output = Result<MutationOutcome, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resource_create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
items: &'life3 [ResourceCreate],
) -> Pin<Box<dyn Future<Output = Result<MutationOutcome, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Create resources (resource_create), POST of an array body:
DAPI-02 as amended 2026-10-12 (create by POST, update by the
signature-checked array PUT). Capture C3a and Decision D10 are the
8.3.6 confirmation: [{name, config}] answers 200 with
{success, changes[].newSignature}.
A 2xx whose body says success:false is an error, never Ok. A
duplicate name is a 409 (D10) and is resource_exists (exit 6). The POST is sent once
per call and never retried: a repeated create against a production
gateway must never be silent. An empty items is invalid_input
with no request.
Sourcefn resource_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
items: &'life3 [ResourceUpdate],
) -> Pin<Box<dyn Future<Output = Result<MutationOutcome, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resource_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
module: &'life1 str,
ty: &'life2 str,
items: &'life3 [ResourceUpdate],
) -> Pin<Box<dyn Future<Output = Result<MutationOutcome, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Update resources (resource_update), PUT of an array body whose
every item carries a name and a signature: DAPI-02 as amended
2026-10-12. Capture C3a and Decision D10 are the 8.3.6
confirmation: a PUT of an unknown name answers a bare 404
(not_found), so a create is never done by PUT.
Decision D3 fixes the refusals. A stale signature is a 500 whose
problem.message says signature mismatch, and it comes back as
resource_signature_rejected (stale, exit 6). An omitted or empty
signature is one byte-identical 422 with fieldName signature
(the two cannot be told apart) and comes back as the same error
(missing); an empty signature is refused before any request. The
refusals leave the resource unchanged. Neither error carries the
signature or the gateway’s problem text. Every successful write
rotates the signature, so an update reusing the pre-write one is
stale. The PUT is sent once per call and never retried. When two
writers race, the gateway’s check serializes them and the loser
gets the stale refusal; the client adds no lock of its own.
Sourcefn scan_lock_acquire<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
acquire_s: u64,
hold_s: u64,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn scan_lock_acquire<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
acquire_s: u64,
hold_s: u64,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Acquire the scan-lock (scan_lock_acquire, capture C1b).
Success is the gateway’s 2xx; the 200 body is ignored. A lock held
by anyone, the caller’s own token included (D2), is refused with
scan_lock_held naming the holder: taken from the refusal body
(D1), else from ONE follow-up DeployApi::scan_lock_info. The
POST is sent once per call. There is no release route (D8); the
lock ends when the holder’s scan runs (D12) or hold_s lapses.
Sourcefn scan_lock_info<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<LockObservation, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn scan_lock_info<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<LockObservation, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the scan-lock (scan_lock_info, capture C1c): 200 with a body
is Held, 204 is Free.
Sourcefn scan_status<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<ScanStatus, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn scan_status<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<ScanStatus, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the scan state (scan_status, capture C1i).
Sourcefn scan_request<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn scan_request<'life0, 'async_trait>(
&'life0 self,
kind: ScanKind,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trigger a scan (scan_request, capture C1i). The POST answering 200
is NEVER completion: its body is a trigger-time snapshot (D4), so it
is ignored; completion comes from DeployApi::scan_status via
scan_complete. The scan-lock does not block another actor’s scan
(D4: a non-holder’s POST answered 200 and ran), so no refusal is
classified on this route. The POST is sent once per call.
Sourcefn modes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ModeRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn modes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ListEnvelope<ModeRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List the deployment modes (modes, capture C-mode “GET /mode”):
limit=-1 and offset=0 go out, the answer is the {items, metadata} envelope, and gateway order is kept. A gateway with no
modes is Ok with no items.
Sourcefn mode_create<'life0, 'life1, 'async_trait>(
&'life0 self,
body: &'life1 ModeCreate,
) -> Pin<Box<dyn Future<Output = Result<ModeRecord, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mode_create<'life0, 'life1, 'async_trait>(
&'life0 self,
body: &'life1 ModeCreate,
) -> Pin<Box<dyn Future<Output = Result<ModeRecord, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Define a deployment mode (mode_create, capture C-mode, D6).
The name is validated before any request (invalid_input). The POST
is sent exactly once and its 2xx body is ignored; success is
confirmed by a follow-up DeployApi::modes read, and the listed
record is returned. A 2xx whose mode is absent from that list is
internal. A duplicate (409) is mode_exists (exit 6) and an
illegal name (400) is invalid_input (exit 2), never Ok. This only DEFINES a mode: it never activates one, restarts
a gateway or sets a JVM argument.
Sourcefn deployment_mode<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn deployment_mode<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The gateway’s active deployment mode (deployment_mode, captures
C-null, D5): None when deploymentMode is null, "", absent
or whitespace-only (no mode), else the name verbatim. Read through
a private probe, so GatewayInfo is untouched.
Sourcefn restart_pending<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn restart_pending<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The changes waiting for a gateway restart (restart_pending, capture
C-restart, DAPI-06): the strings of {"pending": [...]}, in gateway
order, free text of the form Module <State>: <module id>. An empty
list is Ok. A pending entry stays until the gateway restarts, so a
caller that wants the entries a run added compares two reads.
Read only (SF-3): apply reports this list and never restarts or
fails over. A refused or unreadable answer (401 and 403 are Jetty
pages, not JSON) is the usual error; the caller decides that it is a
warning.
Sourcefn redundancy_resync<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn redundancy_resync<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ask the redundancy master to resynchronise its backup
(redundancy_resync, capture C-P3): one POST, no body.
Send it to the MASTER’s session only (D-07); the caller owns that
rule. The POST is sent once per call and never retried, refusals
included. A 200 ({"resync_state":"started"}, either documented body
is accepted and discarded) only means the request was accepted, so
the caller re-verifies the backup’s content.
Sourcefn secret_names<'life0, 'life1, 'async_trait>(
&'life0 self,
provider: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SecretNameListing, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn secret_names<'life0, 'life1, 'async_trait>(
&'life0 self,
provider: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SecretNameListing, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The names of the secrets one provider lists (secret_names, capture
C-P7): a 200 {"secrets": [...]} is SecretNameListing::Listed, a
404 is NoProvider, a 501 or a 500 is CannotList (24-02 K7), and
anything else is the usual classified error (a 401 or 403 is a Jetty
page and is auth_rejected). The provider name must be a safe path
segment (invalid_input before any request). Names only: no value
is read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".