pub struct ServerConfig {Show 16 fields
pub http_port: u16,
pub ws_port: Option<u16>,
pub grpc_port: Option<u16>,
pub admin_port: Option<u16>,
pub metrics_port: Option<u16>,
pub spec_file: Option<PathBuf>,
pub workspace_dir: Option<PathBuf>,
pub profile: Option<String>,
pub enable_admin: bool,
pub enable_metrics: bool,
pub extra_args: Vec<String>,
pub health_timeout: Duration,
pub health_interval: Duration,
pub working_dir: Option<PathBuf>,
pub env_vars: Vec<(String, String)>,
pub binary_path: Option<PathBuf>,
}Expand description
Configuration for a MockForge test server
Fields§
§http_port: u16HTTP server port (default: auto-assigned)
ws_port: Option<u16>WebSocket server port (optional)
grpc_port: Option<u16>gRPC server port (optional)
admin_port: Option<u16>Admin UI port (optional)
metrics_port: Option<u16>Metrics/Prometheus port (optional)
spec_file: Option<PathBuf>Path to OpenAPI specification file (optional)
workspace_dir: Option<PathBuf>Path to workspace directory (optional)
profile: Option<String>Profile name for configuration (optional)
enable_admin: boolEnable admin UI (default: false)
enable_metrics: boolEnable metrics endpoint (default: false)
extra_args: Vec<String>Additional CLI arguments
health_timeout: DurationHealth check timeout (default: 30 seconds)
health_interval: DurationHealth check interval (default: 100ms)
working_dir: Option<PathBuf>Working directory for the server process (optional)
env_vars: Vec<(String, String)>Environment variables for the server process
binary_path: Option<PathBuf>Path to mockforge binary (optional, will search PATH if not provided)
Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn builder() -> ServerConfigBuilder
pub fn builder() -> ServerConfigBuilder
Create a new builder for ServerConfig
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more