struct GrpcMetaClient {
member_monitor_event_sender: Sender<Sender<Result<()>>>,
core: Arc<RwLock<GrpcMetaClientCore>>,
}
Expand description
Client to meta server. Cloning the instance is lightweight.
It is a wrapper of tonic client. See crate::meta_rpc_client_method_impl
.
Fields§
§member_monitor_event_sender: Sender<Sender<Result<()>>>
§core: Arc<RwLock<GrpcMetaClientCore>>
Implementations§
source§impl GrpcMetaClient
impl GrpcMetaClient
const ENDPOINT_KEEP_ALIVE_INTERVAL_SEC: u64 = 60u64
const ENDPOINT_KEEP_ALIVE_TIMEOUT_SEC: u64 = 60u64
const INIT_RETRY_BASE_INTERVAL_MS: u64 = 10u64
const INIT_RETRY_MAX_INTERVAL_MS: u64 = 2_000u64
fn start_meta_member_monitor( &self, init_leader_addr: Uri, members: Either<MetaMemberServiceClient<TracingInjectChannel>, MetaMemberGroup>, force_refresh_receiver: Receiver<Sender<Result<()>>>, meta_config: MetaConfig, ) -> Result<()>
async fn force_refresh_leader(&self) -> Result<()>
sourcepub async fn new(
strategy: &MetaAddressStrategy,
config: MetaConfig,
) -> Result<Self>
pub async fn new( strategy: &MetaAddressStrategy, config: MetaConfig, ) -> Result<Self>
Connect to the meta server from addrs
.
fn addr_to_endpoint(addr: Uri) -> Endpoint
pub(crate) async fn try_build_rpc_channel( addrs: impl IntoIterator<Item = Uri>, ) -> Result<(TracingInjectChannel, Uri)>
async fn connect_to_endpoint(endpoint: Endpoint) -> Result<TracingInjectChannel>
pub(crate) fn retry_strategy_to_bound( high_bound: Duration, exceed: bool, ) -> impl Iterator<Item = Duration>
source§impl GrpcMetaClient
impl GrpcMetaClient
async fn refresh_client_if_needed(&self, code: Code)
source§impl GrpcMetaClient
impl GrpcMetaClient
pub async fn add_worker_node( &self, request: AddWorkerNodeRequest, ) -> Result<AddWorkerNodeResponse>
pub async fn activate_worker_node( &self, request: ActivateWorkerNodeRequest, ) -> Result<ActivateWorkerNodeResponse>
pub async fn delete_worker_node( &self, request: DeleteWorkerNodeRequest, ) -> Result<DeleteWorkerNodeResponse>
pub async fn update_worker_node_schedulability( &self, request: UpdateWorkerNodeSchedulabilityRequest, ) -> Result<UpdateWorkerNodeSchedulabilityResponse>
pub async fn list_all_nodes( &self, request: ListAllNodesRequest, ) -> Result<ListAllNodesResponse>
pub async fn get_cluster_recovery_status( &self, request: GetClusterRecoveryStatusRequest, ) -> Result<GetClusterRecoveryStatusResponse>
pub async fn heartbeat( &self, request: HeartbeatRequest, ) -> Result<HeartbeatResponse>
pub async fn flush(&self, request: FlushRequest) -> Result<FlushResponse>
pub async fn pause(&self, request: PauseRequest) -> Result<PauseResponse>
pub async fn resume(&self, request: ResumeRequest) -> Result<ResumeResponse>
pub async fn apply_throttle( &self, request: ApplyThrottleRequest, ) -> Result<ApplyThrottleResponse>
pub async fn cancel_creating_jobs( &self, request: CancelCreatingJobsRequest, ) -> Result<CancelCreatingJobsResponse>
pub async fn list_table_fragments( &self, request: ListTableFragmentsRequest, ) -> Result<ListTableFragmentsResponse>
pub async fn list_table_fragment_states( &self, request: ListTableFragmentStatesRequest, ) -> Result<ListTableFragmentStatesResponse>
pub async fn list_fragment_distribution( &self, request: ListFragmentDistributionRequest, ) -> Result<ListFragmentDistributionResponse>
pub async fn list_actor_states( &self, request: ListActorStatesRequest, ) -> Result<ListActorStatesResponse>
pub async fn list_actor_splits( &self, request: ListActorSplitsRequest, ) -> Result<ListActorSplitsResponse>
pub async fn list_object_dependencies( &self, request: ListObjectDependenciesRequest, ) -> Result<ListObjectDependenciesResponse>
pub async fn recover(&self, request: RecoverRequest) -> Result<RecoverResponse>
pub async fn list_rate_limits( &self, request: ListRateLimitsRequest, ) -> Result<ListRateLimitsResponse>
pub async fn create_table( &self, request: CreateTableRequest, ) -> Result<CreateTableResponse>
pub async fn alter_name( &self, request: AlterNameRequest, ) -> Result<AlterNameResponse>
pub async fn alter_owner( &self, request: AlterOwnerRequest, ) -> Result<AlterOwnerResponse>
pub async fn alter_set_schema( &self, request: AlterSetSchemaRequest, ) -> Result<AlterSetSchemaResponse>
pub async fn alter_parallelism( &self, request: AlterParallelismRequest, ) -> Result<AlterParallelismResponse>
pub async fn create_materialized_view( &self, request: CreateMaterializedViewRequest, ) -> Result<CreateMaterializedViewResponse>
pub async fn create_view( &self, request: CreateViewRequest, ) -> Result<CreateViewResponse>
pub async fn create_source( &self, request: CreateSourceRequest, ) -> Result<CreateSourceResponse>
pub async fn create_sink( &self, request: CreateSinkRequest, ) -> Result<CreateSinkResponse>
pub async fn create_subscription( &self, request: CreateSubscriptionRequest, ) -> Result<CreateSubscriptionResponse>
pub async fn create_schema( &self, request: CreateSchemaRequest, ) -> Result<CreateSchemaResponse>
pub async fn create_database( &self, request: CreateDatabaseRequest, ) -> Result<CreateDatabaseResponse>
pub async fn create_secret( &self, request: CreateSecretRequest, ) -> Result<CreateSecretResponse>
pub async fn create_index( &self, request: CreateIndexRequest, ) -> Result<CreateIndexResponse>
pub async fn create_function( &self, request: CreateFunctionRequest, ) -> Result<CreateFunctionResponse>
pub async fn drop_table( &self, request: DropTableRequest, ) -> Result<DropTableResponse>
pub async fn drop_materialized_view( &self, request: DropMaterializedViewRequest, ) -> Result<DropMaterializedViewResponse>
pub async fn drop_view( &self, request: DropViewRequest, ) -> Result<DropViewResponse>
pub async fn drop_source( &self, request: DropSourceRequest, ) -> Result<DropSourceResponse>
pub async fn drop_secret( &self, request: DropSecretRequest, ) -> Result<DropSecretResponse>
pub async fn drop_sink( &self, request: DropSinkRequest, ) -> Result<DropSinkResponse>
pub async fn drop_subscription( &self, request: DropSubscriptionRequest, ) -> Result<DropSubscriptionResponse>
pub async fn drop_database( &self, request: DropDatabaseRequest, ) -> Result<DropDatabaseResponse>
pub async fn drop_schema( &self, request: DropSchemaRequest, ) -> Result<DropSchemaResponse>
pub async fn drop_index( &self, request: DropIndexRequest, ) -> Result<DropIndexResponse>
pub async fn drop_function( &self, request: DropFunctionRequest, ) -> Result<DropFunctionResponse>
pub async fn replace_table_plan( &self, request: ReplaceTablePlanRequest, ) -> Result<ReplaceTablePlanResponse>
pub async fn alter_source( &self, request: AlterSourceRequest, ) -> Result<AlterSourceResponse>
pub async fn risectl_list_state_tables( &self, request: RisectlListStateTablesRequest, ) -> Result<RisectlListStateTablesResponse>
pub async fn get_ddl_progress( &self, request: GetDdlProgressRequest, ) -> Result<GetDdlProgressResponse>
pub async fn create_connection( &self, request: CreateConnectionRequest, ) -> Result<CreateConnectionResponse>
pub async fn list_connections( &self, request: ListConnectionsRequest, ) -> Result<ListConnectionsResponse>
pub async fn drop_connection( &self, request: DropConnectionRequest, ) -> Result<DropConnectionResponse>
pub async fn comment_on( &self, request: CommentOnRequest, ) -> Result<CommentOnResponse>
pub async fn get_tables( &self, request: GetTablesRequest, ) -> Result<GetTablesResponse>
pub async fn wait(&self, request: WaitRequest) -> Result<WaitResponse>
pub async fn auto_schema_change( &self, request: AutoSchemaChangeRequest, ) -> Result<AutoSchemaChangeResponse>
pub async fn alter_swap_rename( &self, request: AlterSwapRenameRequest, ) -> Result<AlterSwapRenameResponse>
pub async fn unpin_version_before( &self, request: UnpinVersionBeforeRequest, ) -> Result<UnpinVersionBeforeResponse>
pub async fn get_current_version( &self, request: GetCurrentVersionRequest, ) -> Result<GetCurrentVersionResponse>
pub async fn replay_version_delta( &self, request: ReplayVersionDeltaRequest, ) -> Result<ReplayVersionDeltaResponse>
pub async fn list_version_deltas( &self, request: ListVersionDeltasRequest, ) -> Result<ListVersionDeltasResponse>
pub async fn get_assigned_compact_task_num( &self, request: GetAssignedCompactTaskNumRequest, ) -> Result<GetAssignedCompactTaskNumResponse>
pub async fn trigger_compaction_deterministic( &self, request: TriggerCompactionDeterministicRequest, ) -> Result<TriggerCompactionDeterministicResponse>
pub async fn disable_commit_epoch( &self, request: DisableCommitEpochRequest, ) -> Result<DisableCommitEpochResponse>
pub async fn get_new_sst_ids( &self, request: GetNewSstIdsRequest, ) -> Result<GetNewSstIdsResponse>
pub async fn trigger_manual_compaction( &self, request: TriggerManualCompactionRequest, ) -> Result<TriggerManualCompactionResponse>
pub async fn trigger_full_gc( &self, request: TriggerFullGcRequest, ) -> Result<TriggerFullGcResponse>
pub async fn rise_ctl_get_pinned_versions_summary( &self, request: RiseCtlGetPinnedVersionsSummaryRequest, ) -> Result<RiseCtlGetPinnedVersionsSummaryResponse>
pub async fn rise_ctl_list_compaction_group( &self, request: RiseCtlListCompactionGroupRequest, ) -> Result<RiseCtlListCompactionGroupResponse>
pub async fn rise_ctl_update_compaction_config( &self, request: RiseCtlUpdateCompactionConfigRequest, ) -> Result<RiseCtlUpdateCompactionConfigResponse>
pub async fn rise_ctl_get_checkpoint_version( &self, request: RiseCtlGetCheckpointVersionRequest, ) -> Result<RiseCtlGetCheckpointVersionResponse>
pub async fn rise_ctl_pause_version_checkpoint( &self, request: RiseCtlPauseVersionCheckpointRequest, ) -> Result<RiseCtlPauseVersionCheckpointResponse>
pub async fn rise_ctl_resume_version_checkpoint( &self, request: RiseCtlResumeVersionCheckpointRequest, ) -> Result<RiseCtlResumeVersionCheckpointResponse>
pub async fn init_metadata_for_replay( &self, request: InitMetadataForReplayRequest, ) -> Result<InitMetadataForReplayResponse>
pub async fn split_compaction_group( &self, request: SplitCompactionGroupRequest, ) -> Result<SplitCompactionGroupResponse>
pub async fn rise_ctl_list_compaction_status( &self, request: RiseCtlListCompactionStatusRequest, ) -> Result<RiseCtlListCompactionStatusResponse>
pub async fn get_compaction_score( &self, request: GetCompactionScoreRequest, ) -> Result<GetCompactionScoreResponse>
pub async fn rise_ctl_rebuild_table_stats( &self, request: RiseCtlRebuildTableStatsRequest, ) -> Result<RiseCtlRebuildTableStatsResponse>
pub async fn subscribe_compaction_event( &self, request: impl IntoStreamingRequest<Message = SubscribeCompactionEventRequest>, ) -> Result<Streaming<SubscribeCompactionEventResponse>>
pub async fn list_branched_object( &self, request: ListBranchedObjectRequest, ) -> Result<ListBranchedObjectResponse>
pub async fn list_active_write_limit( &self, request: ListActiveWriteLimitRequest, ) -> Result<ListActiveWriteLimitResponse>
pub async fn list_hummock_meta_config( &self, request: ListHummockMetaConfigRequest, ) -> Result<ListHummockMetaConfigResponse>
pub async fn list_compact_task_assignment( &self, request: ListCompactTaskAssignmentRequest, ) -> Result<ListCompactTaskAssignmentResponse>
pub async fn list_compact_task_progress( &self, request: ListCompactTaskProgressRequest, ) -> Result<ListCompactTaskProgressResponse>
pub async fn cancel_compact_task( &self, request: CancelCompactTaskRequest, ) -> Result<CancelCompactTaskResponse>
pub async fn get_version_by_epoch( &self, request: GetVersionByEpochRequest, ) -> Result<GetVersionByEpochResponse>
pub async fn merge_compaction_group( &self, request: MergeCompactionGroupRequest, ) -> Result<MergeCompactionGroupResponse>
pub async fn create_user( &self, request: CreateUserRequest, ) -> Result<CreateUserResponse>
pub async fn update_user( &self, request: UpdateUserRequest, ) -> Result<UpdateUserResponse>
pub async fn drop_user( &self, request: DropUserRequest, ) -> Result<DropUserResponse>
pub async fn grant_privilege( &self, request: GrantPrivilegeRequest, ) -> Result<GrantPrivilegeResponse>
pub async fn revoke_privilege( &self, request: RevokePrivilegeRequest, ) -> Result<RevokePrivilegeResponse>
pub async fn get_cluster_info( &self, request: GetClusterInfoRequest, ) -> Result<GetClusterInfoResponse>
pub async fn reschedule( &self, request: RescheduleRequest, ) -> Result<RescheduleResponse>
pub async fn subscribe( &self, request: SubscribeRequest, ) -> Result<Streaming<SubscribeResponse>>
pub async fn backup_meta( &self, request: BackupMetaRequest, ) -> Result<BackupMetaResponse>
pub async fn get_backup_job_status( &self, request: GetBackupJobStatusRequest, ) -> Result<GetBackupJobStatusResponse>
pub async fn delete_meta_snapshot( &self, request: DeleteMetaSnapshotRequest, ) -> Result<DeleteMetaSnapshotResponse>
pub async fn get_meta_snapshot_manifest( &self, request: GetMetaSnapshotManifestRequest, ) -> Result<GetMetaSnapshotManifestResponse>
pub async fn get_telemetry_info( &self, request: GetTelemetryInfoRequest, ) -> Result<TelemetryInfoResponse>
pub async fn get_system_params( &self, request: GetSystemParamsRequest, ) -> Result<GetSystemParamsResponse>
pub async fn set_system_param( &self, request: SetSystemParamRequest, ) -> Result<SetSystemParamResponse>
pub async fn get_session_params( &self, request: GetSessionParamsRequest, ) -> Result<GetSessionParamsResponse>
pub async fn set_session_param( &self, request: SetSessionParamRequest, ) -> Result<SetSessionParamResponse>
pub async fn get_serving_vnode_mappings( &self, request: GetServingVnodeMappingsRequest, ) -> Result<GetServingVnodeMappingsResponse>
pub async fn rw_cloud_validate_source( &self, request: RwCloudValidateSourceRequest, ) -> Result<RwCloudValidateSourceResponse>
pub async fn list_event_log( &self, request: ListEventLogRequest, ) -> Result<ListEventLogResponse>
pub async fn add_event_log( &self, request: AddEventLogRequest, ) -> Result<AddEventLogResponse>
pub async fn get_cluster_limits( &self, request: GetClusterLimitsRequest, ) -> Result<GetClusterLimitsResponse>
Trait Implementations§
source§impl Clone for GrpcMetaClient
impl Clone for GrpcMetaClient
source§fn clone(&self) -> GrpcMetaClient
fn clone(&self) -> GrpcMetaClient
Returns a copy 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 Freeze for GrpcMetaClient
impl !RefUnwindSafe for GrpcMetaClient
impl Send for GrpcMetaClient
impl Sync for GrpcMetaClient
impl Unpin for GrpcMetaClient
impl !UnwindSafe for GrpcMetaClient
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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::Request
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level
.source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
.source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
with metric_level
set to
MetricLevel::Debug
and relabel_num
set to 1.