pub struct ValidatorInternalNetworkPreConfig<P> {
pub public_key: ValidatorPublicKey,
pub protocol: P,
pub shards: Vec<ShardConfig>,
pub block_exporters: Vec<ExporterServiceConfig>,
pub proxies: Vec<ProxyConfig>,
}Expand description
The network configuration for all shards.
Fields§
§public_key: ValidatorPublicKeyThe public key of the validator.
protocol: PThe network protocol to use internally.
shards: Vec<ShardConfig>The available shards. Each chain UID is mapped to a unique shard in the vector in a static way.
block_exporters: Vec<ExporterServiceConfig>The server configurations for the linera-exporter. They can be used as optional locations to forward notifications to destinations other than the proxy, by the workers.
proxies: Vec<ProxyConfig>The available proxies.
Implementations§
Source§impl<P> ValidatorInternalNetworkPreConfig<P>
impl<P> ValidatorInternalNetworkPreConfig<P>
pub fn clone_with_protocol<Q>( &self, protocol: Q, ) -> ValidatorInternalNetworkPreConfig<Q>
Source§impl ValidatorInternalNetworkPreConfig<NetworkProtocol>
impl ValidatorInternalNetworkPreConfig<NetworkProtocol>
pub fn exporter_addresses(&self) -> Vec<String>
Source§impl<P> ValidatorInternalNetworkPreConfig<P>
impl<P> ValidatorInternalNetworkPreConfig<P>
Sourcepub fn get_shard_id(&self, chain_id: ChainId) -> ShardId
pub fn get_shard_id(&self, chain_id: ChainId) -> ShardId
Static shard assignment
pub fn shard(&self, shard_id: ShardId) -> &ShardConfig
Sourcepub fn get_shard_for(&self, chain_id: ChainId) -> &ShardConfig
pub fn get_shard_for(&self, chain_id: ChainId) -> &ShardConfig
Gets the ShardConfig of the shard assigned to the chain_id.
Trait Implementations§
Source§impl<P: Clone> Clone for ValidatorInternalNetworkPreConfig<P>
impl<P: Clone> Clone for ValidatorInternalNetworkPreConfig<P>
Source§fn clone(&self) -> ValidatorInternalNetworkPreConfig<P>
fn clone(&self) -> ValidatorInternalNetworkPreConfig<P>
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<P: Debug> Debug for ValidatorInternalNetworkPreConfig<P>
impl<P: Debug> Debug for ValidatorInternalNetworkPreConfig<P>
Source§impl<'de, P> Deserialize<'de> for ValidatorInternalNetworkPreConfig<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for ValidatorInternalNetworkPreConfig<P>where
P: Deserialize<'de>,
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<P: Eq> Eq for ValidatorInternalNetworkPreConfig<P>
Source§impl<P: PartialEq> PartialEq for ValidatorInternalNetworkPreConfig<P>
impl<P: PartialEq> PartialEq for ValidatorInternalNetworkPreConfig<P>
Source§fn eq(&self, other: &ValidatorInternalNetworkPreConfig<P>) -> bool
fn eq(&self, other: &ValidatorInternalNetworkPreConfig<P>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<P> Serialize for ValidatorInternalNetworkPreConfig<P>where
P: Serialize,
impl<P> Serialize for ValidatorInternalNetworkPreConfig<P>where
P: Serialize,
impl<P> StructuralPartialEq for ValidatorInternalNetworkPreConfig<P>
Auto Trait Implementations§
impl<P> Freeze for ValidatorInternalNetworkPreConfig<P>where
P: Freeze,
impl<P> RefUnwindSafe for ValidatorInternalNetworkPreConfig<P>where
P: RefUnwindSafe,
impl<P> Send for ValidatorInternalNetworkPreConfig<P>where
P: Send,
impl<P> Sync for ValidatorInternalNetworkPreConfig<P>where
P: Sync,
impl<P> Unpin for ValidatorInternalNetworkPreConfig<P>where
P: Unpin,
impl<P> UnsafeUnpin for ValidatorInternalNetworkPreConfig<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for ValidatorInternalNetworkPreConfig<P>where
P: UnwindSafe,
Blanket Implementations§
impl<_INNER> AutoTraits for _INNER
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,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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::Requestimpl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
impl<T> Post for Twhere
T: Send + 'static,
Source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.