pub fn archive_export_request_subject(
nats_subject: &str,
asset: Option<u32>,
site_id: Option<&str>,
box_id: Option<&str>,
labjack_name: Option<&str>,
source_type: Option<&str>,
source_id: Option<&str>,
) -> StringExpand description
Builds the NATS request subject that the exporter serves archive exports on.
Always uses the structured layout <root>.<site>.<box>.<source>.export.request,
whatever the root, with every token passed through sanitize_token. Missing or
empty IDs become unknown-site and unknown-box, and the source is chosen by
source_token exactly as for the live subjects, so the webapp reaches the
exporter with the subject it derives from the source’s config.
§Arguments
nats_subject- Subject root, for exampleavenars.asset- Asset number, the last-resort source token, if known.site_id- Site ID.box_id- Box ID.labjack_name- LabJack name, used as the source whensource_idis not set.source_type- Accepted for config compatibility; not used in the subject.source_id- Source ID.
§Examples
("avenars", None, Some("i69"), Some("i69-mu1"), None, Some("labjack"), Some("i69-lj2"))
-> "avenars.i69.i69-mu1.i69-lj2.export.request"
("avenars", Some(42), None, None, None, None, None)
-> "avenars.unknown-site.unknown-box.asset042.export.request"