pub struct FleetSecrets { /* private fields */ }Expand description
Decrypted, in-memory fleet secrets state. Cheap to clone (it’s an
Arc<ArcSwap<...>> under the hood), so callers can hand the wrapper
directly to handlers.
Implementations§
Source§impl FleetSecrets
impl FleetSecrets
Sourcepub fn new() -> FleetSecrets
pub fn new() -> FleetSecrets
Construct an empty FleetSecrets wrapper.
Sourcepub fn from_providers(
providers: HashMap<String, ProviderOverride>,
) -> FleetSecrets
pub fn from_providers( providers: HashMap<String, ProviderOverride>, ) -> FleetSecrets
Construct from a prebuilt map (used by the DB loader).
Sourcepub fn store(&self, providers: HashMap<String, ProviderOverride>)
pub fn store(&self, providers: HashMap<String, ProviderOverride>)
Atomic swap to a new map. Reads continue to see the old map; new readers see the new map.
Sourcepub fn get(&self, provider_name: &str) -> Option<ProviderOverride>
pub fn get(&self, provider_name: &str) -> Option<ProviderOverride>
Look up an override entry by provider name.
Sourcepub fn list(&self) -> Vec<(String, ProviderOverride)>
pub fn list(&self) -> Vec<(String, ProviderOverride)>
Return all overrides (cloned).
Trait Implementations§
Source§impl Clone for FleetSecrets
impl Clone for FleetSecrets
Source§fn clone(&self) -> FleetSecrets
fn clone(&self) -> FleetSecrets
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FleetSecrets
impl Debug for FleetSecrets
Source§impl Default for FleetSecrets
impl Default for FleetSecrets
Source§fn default() -> FleetSecrets
fn default() -> FleetSecrets
Returns the “default value” for a type. Read more
Source§impl Service for FleetSecrets
impl Service for FleetSecrets
Auto Trait Implementations§
impl Freeze for FleetSecrets
impl RefUnwindSafe for FleetSecrets
impl Send for FleetSecrets
impl Sync for FleetSecrets
impl Unpin for FleetSecrets
impl UnsafeUnpin for FleetSecrets
impl UnwindSafe for FleetSecrets
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
Mutably borrows from an owned value. Read more
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> 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 more