pub struct DirectArtifactSink { /* private fields */ }Expand description
ArtifactSink backed by a blob store and a run store in the same process.
Used by the API server and by any in-process engine. A remote worker uses an HTTP-backed sink instead.
§Examples
use std::sync::Arc;
use ironflow_artifacts::local::LocalBlobStore;
use ironflow_engine::artifact::DirectArtifactSink;
use ironflow_store::memory::InMemoryStore;
use ironflow_store::store::Store;
let store: Arc<dyn Store> = Arc::new(InMemoryStore::new());
let blob = Arc::new(LocalBlobStore::new("/var/lib/ironflow/artifacts"));
let sink = DirectArtifactSink::new(blob, store);Implementations§
Trait Implementations§
Source§impl ArtifactSink for DirectArtifactSink
impl ArtifactSink for DirectArtifactSink
Source§fn put<'a>(
&'a self,
upload: ArtifactUpload,
content: ByteStream,
) -> ArtifactFuture<'a, Artifact>
fn put<'a>( &'a self, upload: ArtifactUpload, content: ByteStream, ) -> ArtifactFuture<'a, Artifact>
Store the bytes of an artifact and record its metadata. Read more
Source§fn get<'a>(&'a self, artifact: &'a Artifact) -> ArtifactFuture<'a, ByteStream>
fn get<'a>(&'a self, artifact: &'a Artifact) -> ArtifactFuture<'a, ByteStream>
Open the bytes of a recorded artifact for reading. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DirectArtifactSink
impl !UnwindSafe for DirectArtifactSink
impl Freeze for DirectArtifactSink
impl Send for DirectArtifactSink
impl Sync for DirectArtifactSink
impl Unpin for DirectArtifactSink
impl UnsafeUnpin for DirectArtifactSink
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
Mutably borrows from an owned value. Read more