pub struct WorkerConfig {
pub worker_id: String,
pub get_job_url: String,
pub post_output_url: String,
pub ping_url: Option<String>,
pub api_key: Option<String>,
pub concurrency: usize,
pub ping_interval: Duration,
pub request_timeout: Duration,
}Available on crate feature
serverless only.Expand description
Configuration for an in-container RunPod Serverless worker.
Fields§
§worker_id: StringWorker id; defaults to RUNPOD_POD_ID.
get_job_url: StringJob acquisition URL from RUNPOD_WEBHOOK_GET_JOB.
post_output_url: StringJob result URL from RUNPOD_WEBHOOK_POST_OUTPUT.
ping_url: Option<String>Optional heartbeat URL from RUNPOD_WEBHOOK_PING.
api_key: Option<String>Authorization value sent to RunPod worker endpoints.
concurrency: usizePoll concurrency. Defaults to 1.
ping_interval: DurationHeartbeat interval. Defaults to RUNPOD_PING_INTERVAL milliseconds or 10s.
request_timeout: DurationRequest timeout for job polling and result posts.
Implementations§
Trait Implementations§
Source§impl Clone for WorkerConfig
impl Clone for WorkerConfig
Source§fn clone(&self) -> WorkerConfig
fn clone(&self) -> WorkerConfig
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 Freeze for WorkerConfig
impl RefUnwindSafe for WorkerConfig
impl Send for WorkerConfig
impl Sync for WorkerConfig
impl Unpin for WorkerConfig
impl UnsafeUnpin for WorkerConfig
impl UnwindSafe for WorkerConfig
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