pub struct RemoteChannelHandle { /* private fields */ }Expand description
Channel handle that communicates through SDK-internal wire protocol transport.
Implementations§
Source§impl RemoteChannelHandle
impl RemoteChannelHandle
Sourcepub fn new(config: &RemoteConfig) -> Result<Self, SdkError>
pub fn new(config: &RemoteConfig) -> Result<Self, SdkError>
Sourcepub fn connection_state(&self) -> ConnectionState
pub fn connection_state(&self) -> ConnectionState
Returns current lifecycle state from the SDK-003 state machine.
Sourcepub fn reconnect<J>(&self, jitter: &mut J) -> Result<Duration, SdkError>where
J: ReconnectJitter + ?Sized,
pub fn reconnect<J>(&self, jitter: &mut J) -> Result<Duration, SdkError>where
J: ReconnectJitter + ?Sized,
Sourcepub fn track_subscription(&self) -> Result<SubscriptionId, SdkError>
pub fn track_subscription(&self) -> Result<SubscriptionId, SdkError>
Sourcepub fn acknowledge(
&self,
subscription_id: SubscriptionId,
sequence: u64,
) -> Result<(), SdkError>
pub fn acknowledge( &self, subscription_id: SubscriptionId, sequence: u64, ) -> Result<(), SdkError>
Sourcepub const fn server_address(&self) -> &ServerAddress
pub const fn server_address(&self) -> &ServerAddress
Returns remote server address used by this handle.
Source§impl RemoteChannelHandle
impl RemoteChannelHandle
Sourcepub fn publish_with_idempotency_key<M>(
&self,
message: &M,
idempotency_key: &str,
) -> Result<DeliveryAck, SdkError>where
M: Serialize + SchemaValidate,
pub fn publish_with_idempotency_key<M>(
&self,
message: &M,
idempotency_key: &str,
) -> Result<DeliveryAck, SdkError>where
M: Serialize + SchemaValidate,
Publishes a message with an idempotency key and returns a genuine delivery ack.
The idempotency key drives dedup-on-delivery on the server: a re-publish of
the same key is delivered to subscribers at most once. The returned
DeliveryAck reports whether this publish was genuinely accepted by a
subscriber (DeliveryAck::is_accepted), which a caller such as the aion
outbox uses to treat the send as done only on real acceptance. This is
distinct from the backpressure-only publish.
§Errors
Returns SdkError when the message cannot be serialized, the round trip
fails, or the transport cannot produce a genuine delivery ack.
Trait Implementations§
Source§impl ChannelHandle for RemoteChannelHandle
impl ChannelHandle for RemoteChannelHandle
Source§type Subscription<M> = SdkSubscription<M>
where
M: DeserializeOwned
type Subscription<M> = SdkSubscription<M> where M: DeserializeOwned
subscribe for message type M.Source§type ReplyFuture<'a, Resp> = ReadyResult<Resp>
where
Self: 'a,
Resp: DeserializeOwned + 'a
type ReplyFuture<'a, Resp> = ReadyResult<Resp> where Self: 'a, Resp: DeserializeOwned + 'a
request_reply for reply type Resp.Source§fn publish<M>(&self, message: M) -> Result<PressureResponse, SdkError>where
M: Serialize + SchemaValidate,
fn publish<M>(&self, message: M) -> Result<PressureResponse, SdkError>where
M: Serialize + SchemaValidate,
Source§fn subscribe<M>(&self) -> Self::Subscription<M>where
M: DeserializeOwned,
fn subscribe<M>(&self) -> Self::Subscription<M>where
M: DeserializeOwned,
Source§fn request_reply<Req, Resp>(&self, request: Req) -> ReadyResult<Resp> ⓘ
fn request_reply<Req, Resp>(&self, request: Req) -> ReadyResult<Resp> ⓘ
Source§impl Clone for RemoteChannelHandle
impl Clone for RemoteChannelHandle
Source§fn clone(&self) -> RemoteChannelHandle
fn clone(&self) -> RemoteChannelHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more