Skip to navigation

Struct Atif Remote Storage

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub struct AtifRemoteStorage {
    pub sender: Sender<AtifUploadRequest>,
    pub key_prefix: String,
    pub index: usize,
    pub resource_kind: &'static str,
    pub access_state: AtomicU8,
}

Remote storage handle for ATIF trajectory uploads.

The handle owns a dedicated OS thread that runs a single-threaded tokio runtime. Subscriber callbacks (which run on the runtime that emitted the event) submit uploads over a synchronous channel and block on the reply, so the handle stays safe to drive from any thread regardless of whether the caller is already inside another tokio runtime.

Fields

sender: Sender<AtifUploadRequest>

key_prefix: String

index: usize

resource_kind: &'static str

access_state: AtomicU8

Implementations

impl AtifRemoteStorage

impl AtifRemoteStorage

from_config

pub fn from_config(
    index: usize,
    config: &AtifStorageConfig,
    plaintext: &PlaintextPolicy,
) -> Result<Self>

build_http

pub fn build_http(
    index: usize,
    http: &HttpStorageConfig,
    plaintext: &PlaintextPolicy,
) -> Result<Self>

build_s3

pub fn build_s3(index: usize, s3: &S3StorageConfig) -> Result<Self>

put

pub fn put(
    &self,
    filename: &str,
    session_id: &str,
    payload: &[u8],
) -> Result<()>