Struct teller_core::teller::Teller
source · pub struct Teller { /* private fields */ }Implementations§
source§impl Teller
impl Teller
sourcepub async fn from_config(config: &Config) -> Result<Self>
pub async fn from_config(config: &Config) -> Result<Self>
sourcepub async fn collect(&self) -> ProviderResult<Vec<KV>>
pub async fn collect(&self) -> ProviderResult<Vec<KV>>
Collects kvs from all provider maps in the current configuration
§Errors
This function will return an error if IO fails
sourcepub async fn put(
&self,
kvs: &[KV],
map_id: &str,
providers: &[String]
) -> Result<()>
pub async fn put( &self, kvs: &[KV], map_id: &str, providers: &[String] ) -> Result<()>
Put a list of KVs into a list of providers, on a specified path
§Errors
This function will return an error if put fails
sourcepub async fn delete(
&self,
keys: &[String],
map_id: &str,
providers: &[String]
) -> Result<()>
pub async fn delete( &self, keys: &[String], map_id: &str, providers: &[String] ) -> Result<()>
Delete a list of keys or a complete path for every provider in the list
§Errors
This function will return an error if delete fails
sourcepub fn get_pathmap_on_provider(
&self,
map_id: &str,
provider_name: &String
) -> Result<(&Box<dyn Provider + Send + Sync>, &PathMap)>
pub fn get_pathmap_on_provider( &self, map_id: &str, provider_name: &String ) -> Result<(&Box<dyn Provider + Send + Sync>, &PathMap)>
Get a provider and pathmap from configuration and registry
§Errors
This function will return an error if operation fails
sourcepub async fn run<'a>(&self, cmd: &[&str], opts: &Opts<'a>) -> Result<Output>
pub async fn run<'a>(&self, cmd: &[&str], opts: &Opts<'a>) -> Result<Output>
Run an external command with provider based environment variables
§Errors
This function will return an error if command fails
sourcepub async fn template(&self, template: &str) -> Result<String>
pub async fn template(&self, template: &str) -> Result<String>
Populate a custom template with KVs
§Errors
This function will return an error if template rendering fails
Auto Trait Implementations§
impl Freeze for Teller
impl !RefUnwindSafe for Teller
impl Send for Teller
impl Sync for Teller
impl Unpin for Teller
impl !UnwindSafe for Teller
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
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::RequestCreates a shared type from an unshared type.