pub struct Config {
pub host: Option<String>,
pub port: Option<u16>,
pub base_path: Option<String>,
pub upstream: UpstreamConfig,
pub auth: AuthConfig,
}bin only.Expand description
Standalone storage-proxy configuration.
Fields§
§host: Option<String>Host/interface to bind. Defaults to DEFAULT_HOST (all interfaces).
port: Option<u16>TCP port to listen on. Defaults to DEFAULT_PORT.
base_path: Option<String>URL prefix the byte-proxy surface is mounted under. Defaults to
DEFAULT_BASE_PATH.
upstream: UpstreamConfigUpstream Unity Catalog to resolve securables and vend credentials through. Required.
auth: AuthConfigHow incoming requests are authenticated. Defaults to anonymous.
Implementations§
Source§impl Config
impl Config
Sourcepub fn load(path: &str) -> Result<Self, String>
pub fn load(path: &str) -> Result<Self, String>
Load configuration from an optional YAML file path.
None (or a path that does not exist) yields an error, because the
upstream URL is required and has no default — a config-less run must
supply it via CLI flags instead (see the serve command’s
--upstream-url). This is only called when a path is given.
Sourcepub fn resolved_host(&self) -> &str
pub fn resolved_host(&self) -> &str
Resolved bind host: the configured value, else DEFAULT_HOST.
Sourcepub fn resolved_port(&self) -> u16
pub fn resolved_port(&self) -> u16
Resolved listen port: the configured value, else DEFAULT_PORT.
Sourcepub fn resolved_base_path(&self) -> String
pub fn resolved_base_path(&self) -> String
Resolved mount prefix: the configured value, else DEFAULT_BASE_PATH.
Normalized to a single leading slash with no trailing slash; an empty
value means “mount at root”.
Sourcepub fn health_url(&self) -> String
pub fn health_url(&self) -> String
The /health URL a healthcheck probe should GET. A wildcard bind host
maps to loopback, since that is not a connectable address for a client.
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>,
impl StructuralPartialEq for Config
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more