pub struct HStreamApiClient<T> { /* private fields */ }Implementations§
Source§impl<T> HStreamApiClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> HStreamApiClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> HStreamApiClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
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.
pub async fn echo( &mut self, request: impl IntoRequest<EchoRequest>, ) -> Result<Response<EchoResponse>, Status>
Sourcepub async fn create_stream(
&mut self,
request: impl IntoRequest<Stream>,
) -> Result<Response<Stream>, Status>
pub async fn create_stream( &mut self, request: impl IntoRequest<Stream>, ) -> Result<Response<Stream>, Status>
Stream APIs
pub async fn delete_stream( &mut self, request: impl IntoRequest<DeleteStreamRequest>, ) -> Result<Response<()>, Status>
pub async fn get_stream( &mut self, request: impl IntoRequest<GetStreamRequest>, ) -> Result<Response<GetStreamResponse>, Status>
pub async fn list_streams( &mut self, request: impl IntoRequest<ListStreamsRequest>, ) -> Result<Response<ListStreamsResponse>, Status>
pub async fn list_streams_with_prefix( &mut self, request: impl IntoRequest<ListStreamsWithPrefixRequest>, ) -> Result<Response<ListStreamsResponse>, Status>
pub async fn lookup_shard( &mut self, request: impl IntoRequest<LookupShardRequest>, ) -> Result<Response<LookupShardResponse>, Status>
pub async fn append( &mut self, request: impl IntoRequest<AppendRequest>, ) -> Result<Response<AppendResponse>, Status>
Sourcepub async fn list_shards(
&mut self,
request: impl IntoRequest<ListShardsRequest>,
) -> Result<Response<ListShardsResponse>, Status>
pub async fn list_shards( &mut self, request: impl IntoRequest<ListShardsRequest>, ) -> Result<Response<ListShardsResponse>, Status>
Shard APIs
pub async fn create_shard_reader( &mut self, request: impl IntoRequest<CreateShardReaderRequest>, ) -> Result<Response<CreateShardReaderResponse>, Status>
pub async fn lookup_shard_reader( &mut self, request: impl IntoRequest<LookupShardReaderRequest>, ) -> Result<Response<LookupShardReaderResponse>, Status>
pub async fn read_shard( &mut self, request: impl IntoRequest<ReadShardRequest>, ) -> Result<Response<ReadShardResponse>, Status>
pub async fn list_shard_readers( &mut self, request: impl IntoRequest<ListShardReadersRequest>, ) -> Result<Response<ListShardReadersResponse>, Status>
pub async fn delete_shard_reader( &mut self, request: impl IntoRequest<DeleteShardReaderRequest>, ) -> Result<Response<()>, Status>
Sourcepub async fn create_subscription(
&mut self,
request: impl IntoRequest<Subscription>,
) -> Result<Response<Subscription>, Status>
pub async fn create_subscription( &mut self, request: impl IntoRequest<Subscription>, ) -> Result<Response<Subscription>, Status>
Subscribe APIs
pub async fn get_subscription( &mut self, request: impl IntoRequest<GetSubscriptionRequest>, ) -> Result<Response<GetSubscriptionResponse>, Status>
pub async fn list_subscriptions( &mut self, request: impl IntoRequest<ListSubscriptionsRequest>, ) -> Result<Response<ListSubscriptionsResponse>, Status>
pub async fn list_subscriptions_with_prefix( &mut self, request: impl IntoRequest<ListSubscriptionsWithPrefixRequest>, ) -> Result<Response<ListSubscriptionsResponse>, Status>
pub async fn list_consumers( &mut self, request: impl IntoRequest<ListConsumersRequest>, ) -> Result<Response<ListConsumersResponse>, Status>
pub async fn check_subscription_exist( &mut self, request: impl IntoRequest<CheckSubscriptionExistRequest>, ) -> Result<Response<CheckSubscriptionExistResponse>, Status>
pub async fn delete_subscription( &mut self, request: impl IntoRequest<DeleteSubscriptionRequest>, ) -> Result<Response<()>, Status>
pub async fn lookup_subscription( &mut self, request: impl IntoRequest<LookupSubscriptionRequest>, ) -> Result<Response<LookupSubscriptionResponse>, Status>
pub async fn streaming_fetch( &mut self, request: impl IntoStreamingRequest<Message = StreamingFetchRequest>, ) -> Result<Response<Streaming<StreamingFetchResponse>>, Status>
Sourcepub async fn describe_cluster(
&mut self,
request: impl IntoRequest<()>,
) -> Result<Response<DescribeClusterResponse>, Status>
pub async fn describe_cluster( &mut self, request: impl IntoRequest<()>, ) -> Result<Response<DescribeClusterResponse>, Status>
Cluster APIs
pub async fn lookup_resource( &mut self, request: impl IntoRequest<LookupResourceRequest>, ) -> Result<Response<ServerNode>, Status>
Sourcepub async fn send_admin_command(
&mut self,
request: impl IntoRequest<AdminCommandRequest>,
) -> Result<Response<AdminCommandResponse>, Status>
pub async fn send_admin_command( &mut self, request: impl IntoRequest<AdminCommandRequest>, ) -> Result<Response<AdminCommandResponse>, Status>
Admin Command
Sourcepub async fn per_stream_time_series_stats(
&mut self,
request: impl IntoRequest<PerStreamTimeSeriesStatsRequest>,
) -> Result<Response<PerStreamTimeSeriesStatsResponse>, Status>
pub async fn per_stream_time_series_stats( &mut self, request: impl IntoRequest<PerStreamTimeSeriesStatsRequest>, ) -> Result<Response<PerStreamTimeSeriesStatsResponse>, Status>
Stats
pub async fn per_stream_time_series_stats_all( &mut self, request: impl IntoRequest<PerStreamTimeSeriesStatsAllRequest>, ) -> Result<Response<PerStreamTimeSeriesStatsAllResponse>, Status>
pub async fn get_stream_stats( &mut self, request: impl IntoRequest<GetStreamStatsRequest>, ) -> Result<Response<GetStreamStatsResponse>, Status>
pub async fn get_subscription_stats( &mut self, request: impl IntoRequest<GetSubscriptionStatsRequest>, ) -> Result<Response<GetSubscriptionStatsResponse>, Status>
Sourcepub async fn execute_push_query(
&mut self,
request: impl IntoRequest<CommandPushQuery>,
) -> Result<Response<Streaming<Struct>>, Status>
pub async fn execute_push_query( &mut self, request: impl IntoRequest<CommandPushQuery>, ) -> Result<Response<Streaming<Struct>>, Status>
only for push query e.g., select (with emit changes)
Sourcepub async fn execute_query(
&mut self,
request: impl IntoRequest<CommandQuery>,
) -> Result<Response<CommandQueryResponse>, Status>
pub async fn execute_query( &mut self, request: impl IntoRequest<CommandQuery>, ) -> Result<Response<CommandQueryResponse>, Status>
for execute any sql stmt except push query, e.g., insert, create, show/list, select(without emit changes) …
Sourcepub async fn create_query(
&mut self,
request: impl IntoRequest<CreateQueryRequest>,
) -> Result<Response<Query>, Status>
pub async fn create_query( &mut self, request: impl IntoRequest<CreateQueryRequest>, ) -> Result<Response<Query>, Status>
query related apis
pub async fn list_queries( &mut self, request: impl IntoRequest<ListQueriesRequest>, ) -> Result<Response<ListQueriesResponse>, Status>
pub async fn get_query( &mut self, request: impl IntoRequest<GetQueryRequest>, ) -> Result<Response<Query>, Status>
pub async fn terminate_queries( &mut self, request: impl IntoRequest<TerminateQueriesRequest>, ) -> Result<Response<TerminateQueriesResponse>, Status>
pub async fn delete_query( &mut self, request: impl IntoRequest<DeleteQueryRequest>, ) -> Result<Response<()>, Status>
pub async fn restart_query( &mut self, request: impl IntoRequest<RestartQueryRequest>, ) -> Result<Response<()>, Status>
Sourcepub async fn create_connector(
&mut self,
request: impl IntoRequest<CreateConnectorRequest>,
) -> Result<Response<Connector>, Status>
pub async fn create_connector( &mut self, request: impl IntoRequest<CreateConnectorRequest>, ) -> Result<Response<Connector>, Status>
connector related apis
pub async fn list_connectors( &mut self, request: impl IntoRequest<ListConnectorsRequest>, ) -> Result<Response<ListConnectorsResponse>, Status>
pub async fn get_connector( &mut self, request: impl IntoRequest<GetConnectorRequest>, ) -> Result<Response<Connector>, Status>
pub async fn delete_connector( &mut self, request: impl IntoRequest<DeleteConnectorRequest>, ) -> Result<Response<()>, Status>
pub async fn pause_connector( &mut self, request: impl IntoRequest<PauseConnectorRequest>, ) -> Result<Response<()>, Status>
pub async fn resume_connector( &mut self, request: impl IntoRequest<ResumeConnectorRequest>, ) -> Result<Response<()>, Status>
pub async fn lookup_connector( &mut self, request: impl IntoRequest<LookupConnectorRequest>, ) -> Result<Response<LookupConnectorResponse>, Status>
Sourcepub async fn list_views(
&mut self,
request: impl IntoRequest<ListViewsRequest>,
) -> Result<Response<ListViewsResponse>, Status>
pub async fn list_views( &mut self, request: impl IntoRequest<ListViewsRequest>, ) -> Result<Response<ListViewsResponse>, Status>
view related apis
pub async fn get_view( &mut self, request: impl IntoRequest<GetViewRequest>, ) -> Result<Response<View>, Status>
pub async fn delete_view( &mut self, request: impl IntoRequest<DeleteViewRequest>, ) -> Result<Response<()>, Status>
Sourcepub async fn list_nodes(
&mut self,
request: impl IntoRequest<ListNodesRequest>,
) -> Result<Response<ListNodesResponse>, Status>
pub async fn list_nodes( &mut self, request: impl IntoRequest<ListNodesRequest>, ) -> Result<Response<ListNodesResponse>, Status>
FIXME: (store)node related apis
pub async fn get_node( &mut self, request: impl IntoRequest<GetNodeRequest>, ) -> Result<Response<Node>, Status>
Trait Implementations§
Source§impl<T: Clone> Clone for HStreamApiClient<T>
impl<T: Clone> Clone for HStreamApiClient<T>
Source§fn clone(&self) -> HStreamApiClient<T>
fn clone(&self) -> HStreamApiClient<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for HStreamApiClient<T>
impl<T> RefUnwindSafe for HStreamApiClient<T>where
T: RefUnwindSafe,
impl<T> Send for HStreamApiClient<T>where
T: Send,
impl<T> Sync for HStreamApiClient<T>where
T: Sync,
impl<T> Unpin for HStreamApiClient<T>where
T: Unpin,
impl<T> UnwindSafe for HStreamApiClient<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
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<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