pub struct AgentDispatchClient { /* private fields */ }Implementations§
Source§impl AgentDispatchClient
impl AgentDispatchClient
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_failover(self, enabled: bool) -> Self
pub fn with_failover(self, enabled: bool) -> Self
Enables or disables region failover (enabled by default). Failover only engages for LiveKit Cloud hosts.
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.
Sourcepub async fn create_dispatch(
&self,
req: CreateAgentDispatchRequest,
) -> ServiceResult<AgentDispatch>
pub async fn create_dispatch( &self, req: CreateAgentDispatchRequest, ) -> ServiceResult<AgentDispatch>
Creates an explicit dispatch for an agent to join a room.
To use explicit dispatch, your agent must be registered with an agent_name.
§Arguments
req- Request containing dispatch creation parameters. The request can include an optionaldeploymentfield to target a specific agent deployment. Leave empty to target the production deployment.
§Returns
The created agent dispatch object
Sourcepub async fn delete_dispatch(
&self,
dispatch_id: impl Into<String>,
room_name: impl Into<String>,
) -> ServiceResult<AgentDispatch>
pub async fn delete_dispatch( &self, dispatch_id: impl Into<String>, room_name: impl Into<String>, ) -> ServiceResult<AgentDispatch>
Sourcepub async fn list_dispatch(
&self,
room_name: impl Into<String>,
) -> ServiceResult<Vec<AgentDispatch>>
pub async fn list_dispatch( &self, room_name: impl Into<String>, ) -> ServiceResult<Vec<AgentDispatch>>
Sourcepub async fn get_dispatch(
&self,
dispatch_id: impl Into<String>,
room_name: impl Into<String>,
) -> ServiceResult<Option<AgentDispatch>>
pub async fn get_dispatch( &self, dispatch_id: impl Into<String>, room_name: impl Into<String>, ) -> ServiceResult<Option<AgentDispatch>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentDispatchClient
impl !UnwindSafe for AgentDispatchClient
impl Freeze for AgentDispatchClient
impl Send for AgentDispatchClient
impl Sync for AgentDispatchClient
impl Unpin for AgentDispatchClient
impl UnsafeUnpin for AgentDispatchClient
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