pub struct AsyncLagerBoxBuilder { /* private fields */ }Expand description
Builder for AsyncLagerBox, for overriding the default timeout, the
debug-service URL, and gateway auth.
Implementations§
Source§impl AsyncLagerBoxBuilder
impl AsyncLagerBoxBuilder
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Override the default HTTP timeout for quick commands (10s unless changed). Long-running actions still compute their own wider budgets.
Sourcepub fn debug_service_url(self, url: impl Into<String>) -> Self
pub fn debug_service_url(self, url: impl Into<String>) -> Self
Override the debug-service base URL (default: the box host on port
8765). Also settable via LAGER_DEBUG_SERVICE_URL.
Sourcepub fn bearer_token(self, token: impl Into<String>) -> Self
pub fn bearer_token(self, token: impl Into<String>) -> Self
Attach Authorization: Bearer <token> to every request, for boxes
behind an authenticating gateway. Also settable via the
LAGER_GATEWAY_TOKEN environment variable.
Without this, the crate reuses the Lager CLI’s session
(lager login <auth_url>, stored in ~/.lager_gateway_auth)
automatically when a gateway asks for auth, including transparent
refresh of expired access tokens. Plain (ungated) boxes are
unaffected either way.
Sourcepub fn build(self) -> Result<AsyncLagerBox>
pub fn build(self) -> Result<AsyncLagerBox>
Build the client.