pub struct HttpServerConfig {
pub bind: SocketAddr,
pub config_path: PathBuf,
pub database_path: PathBuf,
pub workspace: String,
pub bearer_token: Option<BearerToken>,
pub codegraph_enabled: bool,
pub codegraph_binary: Option<OsString>,
}Expand description
Fixed workspace and database configuration for one HTTP server.
Fields§
§bind: SocketAddrSocket address on which the server listens.
config_path: PathBufWorkspace manifest used by status operations.
database_path: PathBufImmutable database selection used by every request.
workspace: StringImmutable workspace selection used by every tool request.
bearer_token: Option<BearerToken>Optional bearer token required by every route when configured.
codegraph_enabled: boolWhether automatic bounded CodeGraph enrichment is enabled.
codegraph_binary: Option<OsString>Optional explicit CodeGraph executable used by local exploration and impact enrichment.
Implementations§
Source§impl HttpServerConfig
impl HttpServerConfig
Sourcepub fn new(
config_path: impl Into<PathBuf>,
database_path: impl Into<PathBuf>,
workspace: impl Into<String>,
) -> Self
pub fn new( config_path: impl Into<PathBuf>, database_path: impl Into<PathBuf>, workspace: impl Into<String>, ) -> Self
Creates loopback-only anonymous HTTP configuration for one workspace.
Sourcepub const fn with_bind(self, bind: SocketAddr) -> Self
pub const fn with_bind(self, bind: SocketAddr) -> Self
Selects an explicit bind address.
Sourcepub fn with_bearer_token(self, token: BearerToken) -> Self
pub fn with_bearer_token(self, token: BearerToken) -> Self
Requires the supplied redacted bearer token on every route.
Sourcepub fn with_codegraph(self, enabled: bool, binary: Option<OsString>) -> Self
pub fn with_codegraph(self, enabled: bool, binary: Option<OsString>) -> Self
Applies trusted process-level CodeGraph policy to local intelligence requests.
Trait Implementations§
Source§impl Clone for HttpServerConfig
impl Clone for HttpServerConfig
Source§fn clone(&self) -> HttpServerConfig
fn clone(&self) -> HttpServerConfig
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 HttpServerConfig
impl RefUnwindSafe for HttpServerConfig
impl Send for HttpServerConfig
impl Sync for HttpServerConfig
impl Unpin for HttpServerConfig
impl UnsafeUnpin for HttpServerConfig
impl UnwindSafe for HttpServerConfig
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