Skip to main content

Crate loonfs_server

Crate loonfs_server 

Source
Expand description

The LoonFS server.

Hosts an embedded loonfs runtime behind the v0 HTTP API for remote-mode clients, with per-namespace write batching in front of the commit protocol. Embedded-mode callers skip this crate entirely and use loonfs directly.

Structs§

GrepConfig
The server’s [grep] table.
RuntimeCacheConfigOverrides
ServerConfig
The server config file.
TlsServerConfig
The server’s TLS identity: one certificate chain and its private key, both read at startup. A file that is missing, unreadable, or not the PEM it claims to be fails the process rather than degrading to plaintext.

Enums§

GrepMode
What this server does about grep: answer queries, keep the index built, both, or neither.
MaintenanceMode
Whether this server maintains the namespaces it touches.
ServeError
Failure starting or running the HTTP server.
ServerConfigError
StoreConfig
Provider selection plus credentials, as written in config files.
TlsConfigError
Why the configured TLS identity could not be used. Every variant names the file it came from; none of them carry key material.
TraceInitError

Functions§

app
Builds the HTTP application: the router that serves requests, and the writer whose background work its host must settle.
init_tracing_from_env
load_server_config
serve
Serves until ctrl-c or SIGTERM, then shuts down gracefully: the listener stops accepting, in-flight requests drain, publisher work finishes, and writer maintenance — the runtime’s steps and grep’s alike — settles before this returns.
serve_with_shutdown
serve with a caller-supplied shutdown trigger instead of process signals, for hosts that manage their own lifecycle.