pub struct DatabaseClient { /* private fields */ }Expand description
Agent databases of the project.
Implementations§
Source§impl DatabaseClient
impl DatabaseClient
Sourcepub fn with_api_key(host: &str, api_key: &str, api_secret: &str) -> Self
pub fn with_api_key(host: &str, api_key: &str, api_secret: &str) -> Self
Authenticates with an API key and secret, signing a short-lived token per request.
Sourcepub fn with_token(host: &str, token: &str) -> Self
pub fn with_token(host: &str, token: &str) -> Self
Authenticates with a pre-signed token, sent verbatim on every request.
Sourcepub fn new(host: &str) -> ServiceResult<Self>
pub fn new(host: &str) -> ServiceResult<Self>
Reads the API key and secret from the LIVEKIT_API_KEY and
LIVEKIT_API_SECRET environment variables.
Sourcepub fn with_request_timeout(self, timeout: Duration) -> Self
pub fn with_request_timeout(self, timeout: Duration) -> Self
Overrides the default per-request timeout (10s) for calls on this client.
pub async fn create(&self, req: CreateRequest) -> ServiceResult<CreateResponse>
pub async fn get(&self, database_id: &str) -> ServiceResult<AgentDatabase>
pub async fn list(&self, req: ListRequest) -> ServiceResult<ListResponse>
pub async fn delete(&self, database_id: &str) -> ServiceResult<()>
Sourcepub async fn export(&self, database_id: &str) -> ServiceResult<ExportResponse>
pub async fn export(&self, database_id: &str) -> ServiceResult<ExportResponse>
A pre-authenticated download URL of a consistent snapshot of the database.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DatabaseClient
impl !UnwindSafe for DatabaseClient
impl Freeze for DatabaseClient
impl Send for DatabaseClient
impl Sync for DatabaseClient
impl Unpin for DatabaseClient
impl UnsafeUnpin for DatabaseClient
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