Struct redgold_schema::structs::NodeMetadata
source · pub struct NodeMetadata {
pub transport_info: Option<TransportInfo>,
pub public_key: Option<PublicKey>,
pub node_type: Option<i32>,
pub version_info: Option<VersionInfo>,
pub partition_info: Option<PartitionInfo>,
pub node_name: Option<String>,
pub peer_id: Option<PeerId>,
pub deposit_addresses: Vec<DepositAddress>,
}Expand description
Per node (machine) metadata, intended to be updated automatically by the hot key on the machine
Fields§
§transport_info: Option<TransportInfo>Information about how to contact the node
public_key: Option<PublicKey>Public key associated with the node signatures for real-time signatures, such as observations
node_type: Option<i32>What type of node this is, in terms of whether it stays online consistently or is ephemeral and can’t be relied upon to be continuously online.
version_info: Option<VersionInfo>Information about the executable and other checksums, also used for coordinating upgrades
partition_info: Option<PartitionInfo>Distances to various types of hashes for partitioning and storage of data. Used for optimizing gossip and long term storage.
node_name: Option<String>Identifier for the particular machine, not guaranteed to be unique across network. Public key should be used primarily, this is only for convenience.
peer_id: Option<PeerId>Corresponding public key of the overall identity controlling this, and other nodes
deposit_addresses: Vec<DepositAddress>Implementations§
source§impl NodeMetadata
impl NodeMetadata
source§impl NodeMetadata
impl NodeMetadata
pub fn port_or(&self, network: NetworkEnvironment) -> u16
pub fn public_key_bytes(&self) -> Result<Vec<u8>, ErrorInfo>
pub fn long_identifier(&self) -> String
pub fn external_address(&self) -> RgResult<String>
pub fn tx_in_range(&self, h: &Hash) -> bool
pub fn hash_in_range( &self, h: &Hash, f: fn(_: &PartitionInfo) -> Option<i64> ) -> bool
Trait Implementations§
source§impl Clone for NodeMetadata
impl Clone for NodeMetadata
source§fn clone(&self) -> NodeMetadata
fn clone(&self) -> NodeMetadata
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for NodeMetadata
impl Debug for NodeMetadata
source§impl Default for NodeMetadata
impl Default for NodeMetadata
source§impl<'de> Deserialize<'de> for NodeMetadata
impl<'de> Deserialize<'de> for NodeMetadata
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>,
source§impl Hash for NodeMetadata
impl Hash for NodeMetadata
source§impl HashClear for NodeMetadata
impl HashClear for NodeMetadata
fn hash_clear(&mut self)
source§impl Message for NodeMetadata
impl Message for NodeMetadata
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self.source§impl PartialEq for NodeMetadata
impl PartialEq for NodeMetadata
source§fn eq(&self, other: &NodeMetadata) -> bool
fn eq(&self, other: &NodeMetadata) -> bool
self and other values to be equal, and is used
by ==.