-
Notifications
You must be signed in to change notification settings - Fork 118
Replace CloudTelemetryAuthInterceptor with a tonic connector #5223
Copy link
Copy link
Open
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
We use CloudTelemetryAuthInterceptor as an interceptor to inject the authentication headers. The interceptors are synchronous, our credentials are async. We periodically refresh the credentials in a background thread and use a tokio::sync::watch to bridge the sync/async gap.
We could use a custom connector to create the Channel:
https://docs.rs/tonic/latest/tonic/transport/struct.Endpoint.html#method.connect_with_connector
https://docs.rs/tonic/latest/tonic/transport/struct.Channel.html#method.new
In that custom connector we can add an async layer that injects the auth headers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.