pub struct PhpPool { /* private fields */ }Implementations§
Source§impl PhpPool
impl PhpPool
Sourcepub fn with_max_requests(
worker_count: usize,
max_requests: u64,
) -> Result<Self, String>
pub fn with_max_requests( worker_count: usize, max_requests: u64, ) -> Result<Self, String>
Create a classic-mode pool with per-worker request lifecycle limit.
Sourcepub fn worker(
worker_count: usize,
worker_script: String,
max_requests: u64,
) -> Result<Self, String>
pub fn worker( worker_count: usize, worker_script: String, max_requests: u64, ) -> Result<Self, String>
Create a worker-mode pool. The worker script boots the framework
once and calls bext_handle_request($callback) in a loop.
Sourcepub fn execute(
&self,
script_path: String,
method: String,
uri: String,
query_string: String,
content_type: Option<String>,
body: Vec<u8>,
cookies: Option<String>,
headers: Vec<(String, String)>,
remote_addr: Option<String>,
server_name: Option<String>,
server_port: u16,
https: bool,
) -> Result<PhpResponse, String>
pub fn execute( &self, script_path: String, method: String, uri: String, query_string: String, content_type: Option<String>, body: Vec<u8>, cookies: Option<String>, headers: Vec<(String, String)>, remote_addr: Option<String>, server_name: Option<String>, server_port: u16, https: bool, ) -> Result<PhpResponse, String>
Execute a PHP request. Blocks until a worker completes.
pub fn healthy_workers(&self) -> u32
pub fn stats(&self) -> PhpPoolStats
pub fn mode(&self) -> &PhpMode
pub fn shutdown(self)
Auto Trait Implementations§
impl Freeze for PhpPool
impl !RefUnwindSafe for PhpPool
impl Send for PhpPool
impl Sync for PhpPool
impl Unpin for PhpPool
impl UnsafeUnpin for PhpPool
impl !UnwindSafe for PhpPool
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