pub struct BlockEngineRelayerClient<T> { /* private fields */ }Expand description
/ Relayers can forward packets to Block Engines. / Block Engines provide an AccountsOfInterest field to only send transactions that are of interest.
Implementations§
Source§impl BlockEngineRelayerClient<Channel>
impl BlockEngineRelayerClient<Channel>
Source§impl<T> BlockEngineRelayerClient<T>
impl<T> BlockEngineRelayerClient<T>
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> BlockEngineRelayerClient<InterceptedService<T, F>>
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn subscribe_accounts_of_interest(
&mut self,
request: impl IntoRequest<AccountsOfInterestRequest>,
) -> Result<Response<Streaming<AccountsOfInterestUpdate>>, Status>
pub async fn subscribe_accounts_of_interest( &mut self, request: impl IntoRequest<AccountsOfInterestRequest>, ) -> Result<Response<Streaming<AccountsOfInterestUpdate>>, Status>
/ The block engine feeds accounts of interest (AOI) updates to the relayer periodically. / For all transactions the relayer receives, it forwards transactions to the block engine which write-lock / any of the accounts in the AOI.
pub async fn subscribe_programs_of_interest( &mut self, request: impl IntoRequest<ProgramsOfInterestRequest>, ) -> Result<Response<Streaming<ProgramsOfInterestUpdate>>, Status>
Sourcepub async fn start_expiring_packet_stream(
&mut self,
request: impl IntoStreamingRequest<Message = PacketBatchUpdate>,
) -> Result<Response<Streaming<StartExpiringPacketStreamResponse>>, Status>
pub async fn start_expiring_packet_stream( &mut self, request: impl IntoStreamingRequest<Message = PacketBatchUpdate>, ) -> Result<Response<Streaming<StartExpiringPacketStreamResponse>>, Status>
Validators can subscribe to packets from the relayer and receive a multiplexed signal that contains a mixture of packets and heartbeats. NOTE: This is a bi-directional stream due to a bug with how Envoy handles half closed client-side streams. The issue is being tracked here: https://github.com/envoyproxy/envoy/issues/22748. In the meantime, the server will stream heartbeats to clients at some reasonable cadence.
Trait Implementations§
Source§impl<T: Clone> Clone for BlockEngineRelayerClient<T>
impl<T: Clone> Clone for BlockEngineRelayerClient<T>
Source§fn clone(&self) -> BlockEngineRelayerClient<T>
fn clone(&self) -> BlockEngineRelayerClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for BlockEngineRelayerClient<T>
impl<T> RefUnwindSafe for BlockEngineRelayerClient<T>where
T: RefUnwindSafe,
impl<T> Send for BlockEngineRelayerClient<T>where
T: Send,
impl<T> Sync for BlockEngineRelayerClient<T>where
T: Sync,
impl<T> Unpin for BlockEngineRelayerClient<T>where
T: Unpin,
impl<T> UnwindSafe for BlockEngineRelayerClient<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].