Struct avalanche_ops::aws::spec::Spec

source ·
pub struct Spec {
Show 16 fields pub version: usize, pub id: String, pub aad_tag: String, pub resource: Resource, pub machine: Machine, pub upload_artifacts: Option<UploadArtifacts>, pub avalanchego_release_tag: Option<String>, pub avalanched_config: Flags, pub enable_nlb: bool, pub disable_logs_auto_removal: bool, pub metrics_fetch_interval_seconds: u64, pub primary_network_validate_period_in_days: u64, pub prefunded_keys: Option<Vec<Info>>, pub avalanchego_config: Config, pub coreth_chain_config: Config, pub avalanchego_genesis_template: Option<Genesis>,
}
Expand description

Represents network-level configuration shared among all nodes. The node-level configuration is generated during each bootstrap process (e.g., certificates) and not defined in this cluster-level “Config”. At the beginning, the user is expected to provide this configuration. “Clone” is for deep-copying.

Fields§

§version: usize§id: String

User-provided ID of the cluster/test. This is NOT the avalanche node ID. This is NOT the avalanche network ID.

§aad_tag: String

AAD tag used for envelope encryption with KMS.

§resource: Resource

AWS resources if run in AWS.

§machine: Machine

Defines how the underlying infrastructure is set up. MUST BE NON-EMPTY.

§upload_artifacts: Option<UploadArtifacts>

Upload artifacts from the local machine to share with remote machines.

§avalanchego_release_tag: Option<String>

Non-empty to specify avalanchego release tag to download. Discarded if avalanchego binary was uploaded to S3.

§avalanched_config: Flags

Flag to pass to the “avalanched” command-line interface.

§enable_nlb: bool

Set “true” to enable NLB.

§disable_logs_auto_removal: bool

Set “true” to disable CloudWatch log auto removal.

§metrics_fetch_interval_seconds: u64

Interval in seconds to fetch system and avalanche node metrics. Set to 0 to disable metrics collection.

§primary_network_validate_period_in_days: u64§prefunded_keys: Option<Vec<Info>>

Required for custom networks with pre-funded wallets! These are used for custom primary network genesis generation and will be pre-funded. The first key will have locked P-chain balance with initial stake duration in genesis. Except the first key in the list, all keys have immediately unlocked P-chain balance. Should never be used for mainnet as it’s store in plaintext for testing purposes only.

§avalanchego_config: Config

Represents the configuration for “avalanchego”. Set as if run in remote machines. For instance, “config-file” must be the path valid in the remote machines. MUST BE “kebab-case” to be compatible with “avalanchego”.

§coreth_chain_config: Config

If non-empty, the JSON-encoded data are saved to a file in Path::new(&avalanchego_config.chain_config_dir).join(“C”).

§avalanchego_genesis_template: Option<Genesis>

If non-empty, the JSON-encoded data are saved to a file and used for “–genesis” in Path::new(&avalanchego_config.genesis). This includes “coreth_genesis::Genesis”. Names after “_template” since it has not included initial stakers yet with to-be-created node IDs.

Implementations§

source§

impl Spec

source

pub async fn default_aws(opts: DefaultSpecOption) -> Result<(Self, String)>

Creates a default spec.

source

pub fn encode_yaml(&self) -> Result<String>

Converts to string in YAML format.

source

pub fn sync(&self, file_path: &str) -> Result<()>

Saves the current spec to disk and overwrites the file.

source

pub fn load(file_path: &str) -> Result<Self>

source

pub fn validate(&self) -> Result<()>

Validates the spec.

Trait Implementations§

source§

impl Clone for Spec

source§

fn clone(&self) -> Spec

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Spec

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Spec

source§

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<Spec> for Spec

source§

fn eq(&self, other: &Spec) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Spec

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Spec

Auto Trait Implementations§

§

impl RefUnwindSafe for Spec

§

impl Send for Spec

§

impl Sync for Spec

§

impl Unpin for Spec

§

impl UnwindSafe for Spec

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

§

impl<T> JsonSchemaMaybe for T