pub struct NodeSpec {
pub id: String,
pub attestor: AttestorMethod,
pub cred_ttl: String,
pub renew_before: String,
pub roles: Vec<String>,
}Expand description
One node’s desired membership facts.
Fields§
§id: StringSPIFFE-style agent id this node signs and presents as. Validated
with crate::validate::validate_agent_id_shape.
attestor: AttestorMethodHow the node attests its identity to the issuer.
cred_ttl: StringCredential lifetime, <int><unit> (e.g. 1h, 30m). Parsed with
crate::config::parse_duration_string.
renew_before: StringLead window before expiry within which the node renews, same form
as cred_ttl. Must be strictly shorter than cred_ttl.
roles: Vec<String>Optional free-form roles (e.g. writer, reader). Not interpreted
here; carried for the reconciler / future RBAC.
Implementations§
Source§impl NodeSpec
impl NodeSpec
Sourcepub fn cred_ttl_duration(&self) -> Option<Duration>
pub fn cred_ttl_duration(&self) -> Option<Duration>
The credential lifetime as a chrono::Duration.
Sourcepub fn renew_before_duration(&self) -> Option<Duration>
pub fn renew_before_duration(&self) -> Option<Duration>
The renewal lead window as a chrono::Duration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeSpec
impl<'de> Deserialize<'de> for NodeSpec
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
impl Eq for NodeSpec
impl StructuralPartialEq for NodeSpec
Auto Trait Implementations§
impl Freeze for NodeSpec
impl RefUnwindSafe for NodeSpec
impl Send for NodeSpec
impl Sync for NodeSpec
impl Unpin for NodeSpec
impl UnsafeUnpin for NodeSpec
impl UnwindSafe for NodeSpec
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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