pub struct ControlGrpcApiConfig {
pub enabled: bool,
pub node_id: String,
pub node_name: String,
pub shared_secret: String,
pub max_clock_skew_secs: u64,
}Expand description
gRPC 控制面配置。
Fields§
§enabled: bool是否启用 NodeAdminService gRPC API。
node_id: String节点 ID(用于认证载荷)
node_name: String节点展示名(为空时回退到 node_id)
nonce-auth 共享密钥(hex, 至少 64 个字符)
max_clock_skew_secs: u64允许的最大时钟偏差(秒)
Implementations§
Source§impl ControlGrpcApiConfig
impl ControlGrpcApiConfig
pub fn effective_node_name(&self) -> String
Trait Implementations§
Source§impl Clone for ControlGrpcApiConfig
impl Clone for ControlGrpcApiConfig
Source§fn clone(&self) -> ControlGrpcApiConfig
fn clone(&self) -> ControlGrpcApiConfig
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 ControlGrpcApiConfig
impl Debug for ControlGrpcApiConfig
Source§impl Default for ControlGrpcApiConfig
impl Default for ControlGrpcApiConfig
Source§impl<'de> Deserialize<'de> for ControlGrpcApiConfig
impl<'de> Deserialize<'de> for ControlGrpcApiConfig
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
Auto Trait Implementations§
impl Freeze for ControlGrpcApiConfig
impl RefUnwindSafe for ControlGrpcApiConfig
impl Send for ControlGrpcApiConfig
impl Sync for ControlGrpcApiConfig
impl Unpin for ControlGrpcApiConfig
impl UnsafeUnpin for ControlGrpcApiConfig
impl UnwindSafe for ControlGrpcApiConfig
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,
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>
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 moreSource§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>
Wrap the input message
T in a tonic::Request