Struct avalanche_ops::aws::spec::Node
source · pub struct Node {
pub region: String,
pub kind: String,
pub machine_id: String,
pub node_id: String,
pub proof_of_possession: ProofOfPossession,
pub public_ip: String,
pub http_endpoint: String,
}Expand description
Represents each anchor/non-anchor node. “camelCase” to be consistent with “ProofOfPossession”.
Fields§
§region: String§kind: String§machine_id: String§node_id: String§proof_of_possession: ProofOfPossession§public_ip: StringOverwrites with the persistent elastic IP if provisioned and mounted via EBS.
http_endpoint: StringImplementations§
source§impl Node
impl Node
pub fn new( region: &str, kind: Kind, machine_id: &str, node_id: &str, public_ip: &str, http_scheme: &str, http_port: u32, public_key: Vec<u8>, proof_of_possession: Vec<u8> ) -> Self
sourcepub fn encode_yaml(&self) -> Result<String>
pub fn encode_yaml(&self) -> Result<String>
Converts to string with YAML encoder.
sourcepub fn sync(&self, file_path: &str) -> Result<()>
pub fn sync(&self, file_path: &str) -> Result<()>
Saves the current anchor node to disk and overwrites the file.
pub fn load(file_path: &str) -> Result<Self>
sourcepub fn compress_base58(&self) -> Result<String>
pub fn compress_base58(&self) -> Result<String>
Encodes the object in YAML format, compresses, and apply base58. Used for shortening S3 file name (s3 supports up to 1,024-byte key name).
sourcepub fn decompress_base58(d: String) -> Result<Self>
pub fn decompress_base58(d: String) -> Result<Self>
Reverse of “compress_base58” by decoding YAML.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
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
source§impl PartialEq<Node> for Node
impl PartialEq<Node> for Node
impl Eq for Node
impl StructuralEq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.