pub struct PubsubConnection {
pub project_id: Option<String>,
pub endpoint: Option<String>,
pub emulator_host: Option<String>,
pub credentials: PubsubCredentials,
}Expand description
Connection settings shared by the Pub/Sub source and sink. Flattened into
each connector config via #[serde(flatten)], so project_id /
endpoint / emulator_host / credentials appear at the config top
level.
Fields§
§project_id: Option<String>GCP project id that owns the topic / subscription. Required for real
Pub/Sub; the emulator infers it from PUBSUB_PROJECT_ID when unset.
endpoint: Option<String>Override the Pub/Sub API endpoint (host:port or URL). Rarely needed —
prefer emulator_host for the emulator.
emulator_host: Option<String>Point the client at a Pub/Sub emulator (host:port). When set, auth is
skipped and the endpoint is taken from this value — mirrors the
PUBSUB_EMULATOR_HOST environment variable the SDK honours.
credentials: PubsubCredentialsHow to authenticate. Defaults to Application Default Credentials.
Implementations§
Source§impl PubsubConnection
impl PubsubConnection
Sourcepub fn effective_emulator_host(&self) -> Option<String>
pub fn effective_emulator_host(&self) -> Option<String>
Effective emulator host: the explicit config value, else the
PUBSUB_EMULATOR_HOST environment variable. None = real Pub/Sub.
Trait Implementations§
Source§impl Clone for PubsubConnection
impl Clone for PubsubConnection
Source§fn clone(&self) -> PubsubConnection
fn clone(&self) -> PubsubConnection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PubsubConnection
impl Debug for PubsubConnection
Source§impl Default for PubsubConnection
impl Default for PubsubConnection
Source§fn default() -> PubsubConnection
fn default() -> PubsubConnection
Source§impl<'de> Deserialize<'de> for PubsubConnection
impl<'de> Deserialize<'de> for PubsubConnection
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PubsubConnection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PubsubConnection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PubsubConnection
impl JsonSchema for PubsubConnection
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for PubsubConnection
impl PartialEq for PubsubConnection
Source§impl Serialize for PubsubConnection
impl Serialize for PubsubConnection
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for PubsubConnection
Auto Trait Implementations§
impl Freeze for PubsubConnection
impl RefUnwindSafe for PubsubConnection
impl Send for PubsubConnection
impl Sync for PubsubConnection
impl Unpin for PubsubConnection
impl UnsafeUnpin for PubsubConnection
impl UnwindSafe for PubsubConnection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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