Struct mz_storage_client::types::connections::CsrClient
source · Expand description
A mz_ccsr::Client
optionally enriched with a keep-alive tokens.
Fields§
§inner: Client
§_drop_token: Option<Box<dyn Any + Send + Sync>>
Methods from Deref<Target = Client>§
sourcepub async fn get_schema_by_id(
&self,
id: i32
) -> impl Future<Output = Result<Schema, GetByIdError>>
pub async fn get_schema_by_id(
&self,
id: i32
) -> impl Future<Output = Result<Schema, GetByIdError>>
Gets the schema with the associated ID.
sourcepub async fn get_schema_by_subject(
&self,
subject: &str
) -> impl Future<Output = Result<Schema, GetBySubjectError>>
pub async fn get_schema_by_subject(
&self,
subject: &str
) -> impl Future<Output = Result<Schema, GetBySubjectError>>
Gets the latest schema for the specified subject.
sourcepub async fn get_subject(
&self,
subject: &str
) -> impl Future<Output = Result<Subject, GetBySubjectError>>
pub async fn get_subject(
&self,
subject: &str
) -> impl Future<Output = Result<Subject, GetBySubjectError>>
Gets the latest version of the specified subject.
sourcepub async fn get_subject_and_references(
&self,
subject: &str
) -> impl Future<Output = Result<(Subject, Vec<Subject, Global>), GetBySubjectError>>
pub async fn get_subject_and_references(
&self,
subject: &str
) -> impl Future<Output = Result<(Subject, Vec<Subject, Global>), GetBySubjectError>>
Gets the latest version of the specified subject as well as all other subjects referenced by that subject (recursively).
The dependencies are returned in alphabetical order by subject name.
sourcepub async fn publish_schema(
&self,
subject: &str,
schema: &str,
schema_type: SchemaType,
references: &[SchemaReference]
) -> impl Future<Output = Result<i32, PublishError>>
pub async fn publish_schema(
&self,
subject: &str,
schema: &str,
schema_type: SchemaType,
references: &[SchemaReference]
) -> impl Future<Output = Result<i32, PublishError>>
Publishes a new schema for the specified subject. The ID of the new schema is returned.
Note that if a schema that is identical to an existing schema for the same subject is published, the ID of the existing schema will be returned.
sourcepub async fn list_subjects(
&self
) -> impl Future<Output = Result<Vec<String, Global>, ListError>>
pub async fn list_subjects(
&self
) -> impl Future<Output = Result<Vec<String, Global>, ListError>>
Lists the names of all subjects that the schema registry is aware of.
sourcepub async fn delete_subject(
&self,
subject: &str
) -> impl Future<Output = Result<(), DeleteError>>
pub async fn delete_subject(
&self,
subject: &str
) -> impl Future<Output = Result<(), DeleteError>>
Deletes all schema versions associated with the specified subject.
This API is only intended to be used in development environments. Deleting schemas only allows new, potentially incompatible schemas to be registered under the same subject. It does not allow the schema ID to be reused.
sourcepub async fn get_subject_and_references_by_id(
&self,
id: i32
) -> impl Future<Output = Result<(Subject, Vec<Subject, Global>), GetBySubjectError>>
pub async fn get_subject_and_references_by_id(
&self,
id: i32
) -> impl Future<Output = Result<(Subject, Vec<Subject, Global>), GetBySubjectError>>
Gets the latest version of the first subject found associated with the scheme with the given id, as well as all other subjects referenced by that subject (recursively).
The dependencies are returned in alphabetical order by subject name.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CsrClient
impl Send for CsrClient
impl Sync for CsrClient
impl Unpin for CsrClient
impl !UnwindSafe for CsrClient
Blanket Implementations§
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.