Struct avassa_client::Client
source · pub struct Client { /* private fields */ }Expand description
The Client is used for all interaction with Control Tower or Edge Enforcer instances.
Use one of the login functions to create an instance.
Implementations
sourceimpl Client
impl Client
sourcepub const fn builder() -> ClientBuilder
pub const fn builder() -> ClientBuilder
Create a Client builder
sourcepub async fn bearer_token(&self) -> String
pub async fn bearer_token(&self) -> String
Returns the login bearer token
sourcepub async fn get_json<T: DeserializeOwned>(
&self,
path: &str,
query_params: Option<&[(&str, &str)]>
) -> Result<T>
pub async fn get_json<T: DeserializeOwned>(
&self,
path: &str,
query_params: Option<&[(&str, &str)]>
) -> Result<T>
GET a json payload from the REST API.
sourcepub async fn get_bytes(
&self,
path: &str,
query_params: Option<&[(&str, &str)]>
) -> Result<Bytes>
pub async fn get_bytes(
&self,
path: &str,
query_params: Option<&[(&str, &str)]>
) -> Result<Bytes>
GET a bytes payload from the REST API.
sourcepub async fn put_json(&self, path: &str, data: &Value) -> Result<Value>
pub async fn put_json(&self, path: &str, data: &Value) -> Result<Value>
PUT arbitrary JSON to a path
sourcepub async fn volga_open_producer(
&self,
producer_name: &str,
topic: &str,
on_no_exists: OnNoExists
) -> Result<Producer>
pub async fn volga_open_producer(
&self,
producer_name: &str,
topic: &str,
on_no_exists: OnNoExists
) -> Result<Producer>
Open a volga producer on a topic
sourcepub async fn volga_open_child_site_producer(
&self,
producer_name: &str,
topic: &str,
site: &str,
on_no_exists: OnNoExists
) -> Result<Producer>
pub async fn volga_open_child_site_producer(
&self,
producer_name: &str,
topic: &str,
site: &str,
on_no_exists: OnNoExists
) -> Result<Producer>
Open a volga NAT producer on a topic in a site
sourcepub async fn volga_open_consumer(
&self,
consumer_name: &str,
topic: &str,
options: Options
) -> Result<Consumer>
pub async fn volga_open_consumer(
&self,
consumer_name: &str,
topic: &str,
options: Options
) -> Result<Consumer>
Creates and opens a Volga consumer
sourcepub async fn volga_open_child_site_consumer(
&self,
consumer_name: &str,
topic: &str,
site: &str,
options: Options
) -> Result<Consumer>
pub async fn volga_open_child_site_consumer(
&self,
consumer_name: &str,
topic: &str,
site: &str,
options: Options
) -> Result<Consumer>
Creates and opens a Volga consumer on a child site
sourcepub async fn volga_open_log_query(&self, query: &Query) -> Result<QueryStream>
pub async fn volga_open_log_query(&self, query: &Query) -> Result<QueryStream>
Opens a query stream
sourcepub async fn open_strongbox_vault(&self, vault: &str) -> Result<Vault>
pub async fn open_strongbox_vault(&self, vault: &str) -> Result<Vault>
Try to open a Strongbox Vault
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more