pub struct NeonBranchSource { /* private fields */ }Available on crate feature
neon only.Expand description
The overlay of the Neon branch an instance is bound to (its source config is a
NeonBinding):
- Postgres:
PGHOST(the direct host),PGUSER,PGDATABASEandPGPASSWORD, which the plan’shosted-postgresreads, andDATABASE_URL(through the pooler) andDATABASE_URL_UNPOOLEDfor whatever reads those; - object storage, when the binding has a credential:
NEON_S3_ENDPOINT,NEON_S3_REGION,NEON_S3_ACCESS_KEY_IDandNEON_S3_SECRET_ACCESS_KEY; - every bound function’s URL, in its variable (
UNITYCATALOG_FUNCTION_URL). A function gone from the branch since binding is an error.
Neon’s credentials don’t expire, so the overlay never needs a refresh.
Implementations§
Source§impl NeonBranchSource
impl NeonBranchSource
Sourcepub fn new(neon: Arc<dyn NeonControl>, secrets: SecretProviders) -> Self
pub fn new(neon: Arc<dyn NeonControl>, secrets: SecretProviders) -> Self
The source, asking neon, with the storage credential’s secret resolved by secrets.
Trait Implementations§
Source§impl Source for NeonBranchSource
impl Source for NeonBranchSource
Source§fn overlay<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 SourceCtx,
) -> Pin<Box<dyn Future<Output = Result<Overlay, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn overlay<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 SourceCtx,
) -> Pin<Box<dyn Future<Output = Result<Overlay, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The overlay for the instance
ctx describes.Source§fn refresh<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 SourceCtx,
current: &'life2 Overlay,
) -> Pin<Box<dyn Future<Output = Result<Overlay, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn refresh<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 SourceCtx,
current: &'life2 Overlay,
) -> Pin<Box<dyn Future<Output = Result<Overlay, SourceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
A fresh overlay once
current has expired. The default asks again.Auto Trait Implementations§
impl !RefUnwindSafe for NeonBranchSource
impl !UnwindSafe for NeonBranchSource
impl Freeze for NeonBranchSource
impl Send for NeonBranchSource
impl Sync for NeonBranchSource
impl Unpin for NeonBranchSource
impl UnsafeUnpin for NeonBranchSource
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