pub struct FloraStack { /* private fields */ }Expand description
Flora stack (flora server and Typesense), running in testcontainers, for integration testing.
Implementations§
Source§impl FloraStack
impl FloraStack
Sourcepub async fn new(stack_options: Option<FloraStackOptions>) -> Result<Self>
pub async fn new(stack_options: Option<FloraStackOptions>) -> Result<Self>
Creates a new instance of the Omry stack.
§Errors
Returns anyhow::Error if we can’t:
- Start the Typesense container
- Get the client config to connect to Typesense
- Map the Typesense host to Docker’s platform-specific localhost address (this differs between Linux and macOS)
- Start the Omry container
Sourcepub async fn stop(&self) -> Result<()>
pub async fn stop(&self) -> Result<()>
Stops the Docker containers in this Omry stack.
§Errors
Returns anyhow::Result if we can’t:
- Stop the Omry container
- Stop the Typesense container
Sourcepub fn flora_container(&self) -> &FloraContainer
pub fn flora_container(&self) -> &FloraContainer
Returns a reference to the flora server test container running as part of this stack.
Sourcepub fn auth_token(&self) -> &str
pub fn auth_token(&self) -> &str
Returns the RPC auth token.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FloraStack
impl !UnwindSafe for FloraStack
impl Freeze for FloraStack
impl Send for FloraStack
impl Sync for FloraStack
impl Unpin for FloraStack
impl UnsafeUnpin for FloraStack
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request