pub struct ServerContext {Show 14 fields
pub expected_token: Option<String>,
pub workdir_root: PathBuf,
pub custom_shell: Option<String>,
pub semaphore: Arc<Semaphore>,
pub lock_manager: WorkspaceLockManager,
pub tags: Vec<String>,
pub queue_depth: Arc<AtomicUsize>,
pub max_runs: usize,
pub min_disk_bytes: u64,
pub cas_store: Option<CasStore>,
pub start_time: Instant,
pub active_builds: Arc<Mutex<HashMap<String, (String, Vec<String>, Instant, String)>>>,
pub connection_limiter: Arc<Semaphore>,
pub max_queued_runs: usize,
}Fields§
§expected_token: Option<String>§workdir_root: PathBuf§custom_shell: Option<String>§semaphore: Arc<Semaphore>§lock_manager: WorkspaceLockManager§queue_depth: Arc<AtomicUsize>§max_runs: usize§min_disk_bytes: u64§cas_store: Option<CasStore>§start_time: Instant§active_builds: Arc<Mutex<HashMap<String, (String, Vec<String>, Instant, String)>>>§connection_limiter: Arc<Semaphore>Caps concurrent client connections; excess sockets are closed on accept.
max_queued_runs: usizeCaps how many runs may wait (project lock or concurrency semaphore) before new runs are rejected with a queue-full error.
Implementations§
Source§impl ServerContext
impl ServerContext
Constant-time authorization check for a client-provided token.
- No token configured (unauthenticated mode): every caller is authorized.
- Token configured: the provided token must match in constant time
(see
protocol::ct_eq_tokens). Empty configured tokens are treated as “no authentication” for compatibility with directrun_servercallers; the CLI rejects them at startup.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServerContext
impl !UnwindSafe for ServerContext
impl Freeze for ServerContext
impl Send for ServerContext
impl Sync for ServerContext
impl Unpin for ServerContext
impl UnsafeUnpin for ServerContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.