pub struct Config {
pub api_key: String,
pub api_url: String,
pub sailbox_api_url: String,
pub imagebuilder_url: String,
pub ingress_base: String,
pub ingress_scheme: IngressScheme,
}Expand description
Resolved SDK configuration: credentials plus the three service endpoints.
Fields§
§api_key: StringBearer API key sent on every request (trimmed of surrounding whitespace).
api_url: StringBase URL of the public Sail REST API (no trailing path).
sailbox_api_url: StringBase URL of the sailbox lifecycle/exec API.
imagebuilder_url: Stringhost:port endpoint that image builds are submitted to.
ingress_base: StringBase URL that listener URLs are built from when the server does not
return one, e.g. https://api.sailresearch.com.
ingress_scheme: IngressSchemeHow a listener’s URL is addressed under ingress_base.
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_env() -> Result<Config, SailError>
pub fn from_env() -> Result<Config, SailError>
Resolve a config from the environment, falling back to the stored
~/.sail credential and settings for any value the environment does not
set. Environment variables always win. The stored API key is applied only
when its tagged target matches the resolved one, so a key minted for one
environment is never sent to another. The key is trimmed so one sourced
with a trailing newline can’t produce a malformed bearer token.
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,
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> 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