pub struct Config {
pub server: ServerConfig,
pub auth: AuthConfig,
pub logging: LoggingConfig,
pub http: HttpConfig,
pub observability: ObservabilityConfig,
pub subscriptions: SubscriptionConfig,
}Expand description
Server configuration
Fields§
§server: ServerConfig§auth: AuthConfig§logging: LoggingConfig§http: HttpConfig§observability: ObservabilityConfig§subscriptions: SubscriptionConfigImplementations§
Source§impl Config
impl Config
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Load configuration from file Searches for vibesql-server.toml in:
- Current directory
- $HOME/.config/vibesql/
- /etc/vibesql/
Sourcepub fn apply_env_overrides(&mut self)
pub fn apply_env_overrides(&mut self)
Apply environment variable overrides to the configuration.
Environment variables with the VIBESQL_ prefix override configuration file values.
This follows the precedence: environment variable > config file > default.
§Supported Environment Variables
| Environment Variable | Config Path |
|---|---|
VIBESQL_SERVER_HOST | server.host |
VIBESQL_SERVER_PORT | server.port |
VIBESQL_SERVER_MAX_CONNECTIONS | server.max_connections |
VIBESQL_SERVER_SSL_ENABLED | server.ssl_enabled |
VIBESQL_SERVER_SSL_CERT | server.ssl_cert |
VIBESQL_SERVER_SSL_KEY | server.ssl_key |
VIBESQL_AUTH_METHOD | auth.method |
VIBESQL_AUTH_PASSWORD_FILE | auth.password_file |
VIBESQL_LOG_LEVEL | logging.level |
VIBESQL_LOG_FILE | logging.file |
VIBESQL_HTTP_ENABLED | http.enabled |
VIBESQL_HTTP_HOST | http.host |
VIBESQL_HTTP_PORT | http.port |
VIBESQL_HTTP_AUTH_ENABLED | http.auth.enabled |
VIBESQL_HTTP_AUTH_METHODS | http.auth.methods |
VIBESQL_HTTP_AUTH_API_KEYS | http.auth.api_keys.keys |
VIBESQL_HTTP_AUTH_JWT_SECRET | http.auth.jwt.secret |
VIBESQL_HTTP_AUTH_JWT_ISSUER | http.auth.jwt.issuer |
VIBESQL_HTTP_AUTH_JWT_AUDIENCE | http.auth.jwt.audience |
VIBESQL_HTTP_AUTH_JWT_EXPIRATION | http.auth.jwt.expiration_secs |
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 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>
Wrap the input message
T in a tonic::Request