pub struct ControllerClientImpl { /* private fields */ }
Implementations§
source§impl ControllerClientImpl
impl ControllerClientImpl
sourcepub fn new(config: ClientConfig, handle: &Handle) -> Self
pub fn new(config: ClientConfig, handle: &Handle) -> Self
Create a pooled connection to the controller. The pool size is decided by the ClientConfig. The requests will be load balanced across multiple connections and every connection supports multiplexing of requests.
Trait Implementations§
source§impl ControllerClient for ControllerClientImpl
impl ControllerClient for ControllerClientImpl
source§fn create_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 Scope
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 Scope
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to create a scope. The future completes with true in the case the scope did not existwhen the controller executed the operation. In the case of a re-attempt to create thesame scope, the future completes with false to indicate that the scope existed when thecontroller executed the operation. Read more
source§fn check_scope_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 Scope
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_scope_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 Scope
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to check if the scope exists. The future completes with true in case the scope existsand a false if it does not exist. Read more
source§fn list_scopes<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 CToken
) -> Pin<Box<dyn Future<Output = ResultRetry<Option<(Vec<Scope>, CToken)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_scopes<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 CToken
) -> Pin<Box<dyn Future<Output = ResultRetry<Option<(Vec<Scope>, CToken)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to list scopes given a continuation token..Use the pravega_controller_client::paginator::list_scopes to paginate over all the scopes. Read more
source§fn list_streams<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 Scope,
token: &'life2 CToken
) -> Pin<Box<dyn Future<Output = ResultRetry<Option<(Vec<ScopedStream>, CToken)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_streams<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 Scope,
token: &'life2 CToken
) -> Pin<Box<dyn Future<Output = ResultRetry<Option<(Vec<ScopedStream>, CToken)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
API to list streams under a given scope and continuation token.Use the pravega_controller_client::paginator::list_streams to paginate over all the streams. Read more
source§fn list_streams_for_tag<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 Scope,
tag: &'life2 str,
token: &'life3 CToken
) -> Pin<Box<dyn Future<Output = ResultRetry<Option<(Vec<ScopedStream>, CToken)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_streams_for_tag<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 Scope,
tag: &'life2 str,
token: &'life3 CToken
) -> Pin<Box<dyn Future<Output = ResultRetry<Option<(Vec<ScopedStream>, CToken)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
API to list streams associated with the given tag under a given scope and continuation token.Use the pravega_controller_client::paginator::list_streams_for_tag to paginate over all the streams. Read more
source§fn delete_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 Scope
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 Scope
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to delete a scope. Note that a scope can only be deleted in the case is it empty. Ifthe scope contains at least one stream, then the delete request will fail. Read more
source§fn create_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_config: &'life1 StreamConfiguration
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_config: &'life1 StreamConfiguration
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to create a stream. The future completes with true in the case the stream did notexist when the controller executed the operation. In the case of a re-attempt to createthe same stream, the future completes with false to indicate that the stream existed whenthe controller executed the operation. Read more
source§fn check_stream_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_stream_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to check if the stream exists. The future completes with true in case the stream existsand a false if it does not exist. Read more
source§fn update_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_config: &'life1 StreamConfiguration
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_config: &'life1 StreamConfiguration
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to update the configuration of a Stream. Read more
source§fn get_stream_configuration<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<StreamConfiguration>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_stream_configuration<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<StreamConfiguration>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to fetch the Stream Configuration of a Stream. Read more
API to fetch the Tags for a Stream. Read more
source§fn truncate_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_cut: &'life1 StreamCut
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn truncate_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_cut: &'life1 StreamCut
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to Truncate stream. This api takes a stream cut point which corresponds to a cut inthe stream segments which is consistent and covers the entire key range space. Read more
source§fn seal_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn seal_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to seal a Stream. Read more
source§fn delete_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to delete a stream. Only a sealed stream can be deleted. Read more
source§fn get_current_segments<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<StreamSegments>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_current_segments<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<StreamSegments>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to get list of current segments for the stream to write to. Read more
source§fn get_epoch_segments<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
epoch: i32
) -> Pin<Box<dyn Future<Output = ResultRetry<StreamSegments>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_epoch_segments<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
epoch: i32
) -> Pin<Box<dyn Future<Output = ResultRetry<StreamSegments>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to get list of segments for a given stream and epoch. Read more
source§fn get_head_segments<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<HashMap<Segment, i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_head_segments<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<HashMap<Segment, i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to get segments pointing to the HEAD of the stream.. Read more
source§fn create_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
lease: Duration
) -> Pin<Box<dyn Future<Output = ResultRetry<TxnSegments>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
lease: Duration
) -> Pin<Box<dyn Future<Output = ResultRetry<TxnSegments>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to create a new transaction. The transaction timeout is relative to the creation time. Read more
source§fn ping_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
tx_id: TxId,
lease: Duration
) -> Pin<Box<dyn Future<Output = ResultRetry<PingStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ping_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
tx_id: TxId,
lease: Duration
) -> Pin<Box<dyn Future<Output = ResultRetry<PingStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
API to send transaction heartbeat and increase the transaction timeout by lease amount of milliseconds. Read more
source§fn commit_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
tx_id: TxId,
writer_id: WriterId,
time: Timestamp
) -> Pin<Box<dyn Future<Output = ResultRetry<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn commit_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
tx_id: TxId,
writer_id: WriterId,
time: Timestamp
) -> Pin<Box<dyn Future<Output = ResultRetry<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Commits a transaction, atomically committing all events to the stream, subject to theordering guarantees specified in {@link EventStreamWriter}. Will fail if the transaction hasalready been committed or aborted. Read more
source§fn abort_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
tx_id: TxId
) -> Pin<Box<dyn Future<Output = ResultRetry<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn abort_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
tx_id: TxId
) -> Pin<Box<dyn Future<Output = ResultRetry<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Aborts a transaction. No events written to it may be read, and no further events may bewritten. Will fail with if the transaction has already been committed or aborted. Read more
source§fn check_transaction_status<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
tx_id: TxId
) -> Pin<Box<dyn Future<Output = ResultRetry<TransactionStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_transaction_status<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
tx_id: TxId
) -> Pin<Box<dyn Future<Output = ResultRetry<TransactionStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the status of the specified transaction. Read more
source§fn get_endpoint_for_segment<'life0, 'life1, 'async_trait>(
&'life0 self,
segment: &'life1 ScopedSegment
) -> Pin<Box<dyn Future<Output = ResultRetry<PravegaNodeUri>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_endpoint_for_segment<'life0, 'life1, 'async_trait>(
&'life0 self,
segment: &'life1 ScopedSegment
) -> Pin<Box<dyn Future<Output = ResultRetry<PravegaNodeUri>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a segment return the endpoint that currently is the owner of that segment.This is called when a reader or a writer needs to determine which host/server it needs to contact toread and write, respectively. The result of this function can be cached until the endpoint isunreachable or indicates it is no longer the owner. Read more
source§fn get_or_refresh_delegation_token_for<'life0, 'async_trait>(
&'life0 self,
stream: ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_or_refresh_delegation_token_for<'life0, 'async_trait>(
&'life0 self,
stream: ScopedStream
) -> Pin<Box<dyn Future<Output = ResultRetry<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Refreshes an expired/non-existent delegation token.@param scope Scope of the stream.@param streamName Name of the stream.@return The delegation token for the given stream. Read more
source§fn get_successors<'life0, 'life1, 'async_trait>(
&'life0 self,
segment: &'life1 ScopedSegment
) -> Pin<Box<dyn Future<Output = ResultRetry<StreamSegmentsWithPredecessors>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_successors<'life0, 'life1, 'async_trait>(
&'life0 self,
segment: &'life1 ScopedSegment
) -> Pin<Box<dyn Future<Output = ResultRetry<StreamSegmentsWithPredecessors>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the successors for a given Segment.
source§fn scale_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
sealed_segment_ids: &'life2 [Segment],
new_ranges: &'life3 [(f64, f64)]
) -> Pin<Box<dyn Future<Output = ResultRetry<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn scale_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
sealed_segment_ids: &'life2 [Segment],
new_ranges: &'life3 [(f64, f64)]
) -> Pin<Box<dyn Future<Output = ResultRetry<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Scale a Stream to the new key ranges. This API returns a result once the scale operation has completed.
This internally uses the check_scale API to verify the Stream Scaling status.
source§fn check_scale<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
scale_epoch: i32
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_scale<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 ScopedStream,
scale_epoch: i32
) -> Pin<Box<dyn Future<Output = ResultRetry<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check the status of a Stream Scale operation for a given scale epoch. It returns a
true
if the stream scaling operation has completed and false
if the stream scaling is
in progress.Auto Trait Implementations§
impl !RefUnwindSafe for ControllerClientImpl
impl Send for ControllerClientImpl
impl Sync for ControllerClientImpl
impl Unpin for ControllerClientImpl
impl !UnwindSafe for ControllerClientImpl
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
Mutably borrows from an owned value. Read more
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> 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::Request