pub struct SchedulerApi { /* private fields */ }Expand description
Cron-based scheduling
Implementations§
Source§impl SchedulerApi
impl SchedulerApi
Sourcepub async fn get_schedule(&self, agent_id: &str) -> Result<Schedule>
pub async fn get_schedule(&self, agent_id: &str) -> Result<Schedule>
Get agent schedule
GET /api/v1/agents/{agentId}/schedule
Required scopes: agents:read.
Sourcepub async fn list_schedules(&self) -> Result<ListSchedulesResponse>
pub async fn list_schedules(&self) -> Result<ListSchedulesResponse>
List every agent schedule
One call for the whole tenant, so a canvas can badge scheduled agents without a per-agent
fetch. agent_name is resolved for display and is absent when the agent record is gone — a
schedule outliving its agent is exactly the case worth showing.
GET /api/v1/schedules
Sourcepub async fn remove_schedule(
&self,
agent_id: &str,
) -> Result<RemoveScheduleResponse>
pub async fn remove_schedule( &self, agent_id: &str, ) -> Result<RemoveScheduleResponse>
Remove agent schedule
DELETE /api/v1/agents/{agentId}/schedule
Required scopes: agents:write.
Sourcepub async fn set_schedule(
&self,
agent_id: &str,
body: &SetScheduleRequest,
) -> Result<ScheduleEntry>
pub async fn set_schedule( &self, agent_id: &str, body: &SetScheduleRequest, ) -> Result<ScheduleEntry>
Set/update agent schedule
PUT /api/v1/agents/{agentId}/schedule
Required scopes: agents:write.
Trait Implementations§
Source§impl Clone for SchedulerApi
impl Clone for SchedulerApi
Source§fn clone(&self) -> SchedulerApi
fn clone(&self) -> SchedulerApi
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SchedulerApi
impl !UnwindSafe for SchedulerApi
impl Freeze for SchedulerApi
impl Send for SchedulerApi
impl Sync for SchedulerApi
impl Unpin for SchedulerApi
impl UnsafeUnpin for SchedulerApi
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