pub struct Config {Show 21 fields
pub api_token: String,
pub kbs: BTreeMap<String, KbSlug>,
pub tenant_slug: TenantSlug,
pub listen_addr: SocketAddr,
pub storage: StorageConfig,
pub events: EventsConfig,
pub log_format: LogFormat,
pub qdrant: ServerQdrantConfig,
pub embedder: EmbedderConfig,
pub webdav_username: String,
pub webdav_password: String,
pub mcp_http_allowed_origins: Vec<String>,
pub mcp_http_allowed_hosts: Vec<String>,
pub mcp_anonymous: McpAnonymous,
pub max_patchable_size: u64,
pub mcp_max_read_bytes: u64,
pub mcp_max_sessions: usize,
pub ready_probe_interval_ms: u64,
pub metrics_listen_addr: Option<SocketAddr>,
pub staging: StagingConfig,
pub oidc: Option<OidcSettings>,
}Expand description
Server-wide configuration.
Fields§
§api_token: StringStatic Bearer token for API authentication (NOTEDTHAT_API_TOKEN).
kbs: BTreeMap<String, KbSlug>Declared knowledge bases, as a sorted map of slug string → KbSlug.
tenant_slug: TenantSlugTenant slug — hardcoded to "default" per Metis directive.
listen_addr: SocketAddrSocket address the HTTP server binds to (NOTEDTHAT_LISTEN_ADDR; default 0.0.0.0:8080).
storage: StorageConfigThe selected storage backend and its configuration
(NOTEDTHAT_STORAGE_BACKEND; default s3).
events: EventsConfigThe selected object change event log and its configuration
(NOTEDTHAT_EVENTS_BACKEND; default none).
log_format: LogFormatLog output format (NOTEDTHAT_LOG_FORMAT; pretty or json).
qdrant: ServerQdrantConfigQdrant client configuration.
embedder: EmbedderConfigEmbedder configuration.
webdav_username: StringWebDAV Basic authentication username (NOTEDTHAT_WEBDAV_USERNAME; required).
webdav_password: StringWebDAV Basic authentication password (NOTEDTHAT_WEBDAV_PASSWORD; required).
mcp_http_allowed_origins: Vec<String>Allowed origins for MCP HTTP CORS (NOTEDTHAT_MCP_HTTP_ALLOWED_ORIGINS; empty → ["null"]).
mcp_http_allowed_hosts: Vec<String>Allowed hosts for MCP HTTP Host header validation (NOTEDTHAT_MCP_HTTP_ALLOWED_HOSTS; empty → ["127.0.0.1", "localhost", "::1"]).
mcp_anonymous: McpAnonymousWhether /mcp admits anonymous callers (NOTEDTHAT_MCP_ANONYMOUS; default auto).
max_patchable_size: u64Maximum patchable object size in bytes (NOTEDTHAT_MAX_PATCHABLE_SIZE; default 100 MiB).
mcp_max_read_bytes: u64Most bytes one MCP object read may fetch (NOTEDTHAT_MCP_MAX_READ_BYTES; default 16 MiB,
the API body cap). Larger objects are read in slices.
mcp_max_sessions: usizeMost MCP sessions this process holds at once (NOTEDTHAT_MCP_MAX_SESSIONS; default 256).
An initialize past the bound is refused 503 with Retry-After: 5 (D38).
ready_probe_interval_ms: u64How often /readyz’s poller probes the storage backend and Qdrant, in
milliseconds; also each probe’s deadline (NOTEDTHAT_READY_PROBE_INTERVAL_MS;
default 5000).
metrics_listen_addr: Option<SocketAddr>Where the Prometheus exposition is served, or None while metrics are
off (NOTEDTHAT_METRICS_ENABLED, NOTEDTHAT_METRICS_LISTEN_ADDR; D69).
One field rather than a flag beside an address, so “enabled, and here”
and “off” are the only two states anything downstream can see. The pair
of settings is reconciled once, in Self::from_cli; an address
supplied while the feature is off refuses startup rather than arriving
here as a value nobody reads.
staging: StagingConfigShared private staging directory for uploads and index snapshots (NOTEDTHAT_UPLOAD_TMP_DIR).
oidc: Option<OidcSettings>Identity-provider settings (NOTEDTHAT_OIDC_*); None when no issuer is set.
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_env() -> Result<Self, Error>
pub fn from_env() -> Result<Self, Error>
Parse configuration from the environment alone.
Equivalent to Config::from_cli over an empty argv, which is what a
container that passes no arguments gets.
§Errors
As Config::from_cli, plus Err(Error::Config { .. }) if a variable holds a
value the parser cannot accept at all.
Sourcepub fn from_cli(cli: ServerCli) -> Result<Self, Error>
pub fn from_cli(cli: ServerCli) -> Result<Self, Error>
Validate the settings this run supplied, from either source.
§Errors
Returns Err(Error::Config { .. }) if any required setting is missing,
if any value is invalid (empty token, bad slug, duplicate slug, etc.), or
if any [REMOVED_LISTENER_ENV_VARS] entry was supplied.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request