#[non_exhaustive]pub struct Attribution { /* private fields */ }Expand description
Caller-supplied labels attached to every request of a repository.
They are rendered into the User-Agent header so the bucket owner can
break traffic down in access logs by three questions:
client: which software is talking to the bucket. The product token of the application or library that embeds icechunk, e.g.weatherlib/0.9.workload: what it is doing. The job, pipeline or deployment that runs the requests, e.g.nightly-ingestordashboard-v2.principal: on whose behalf. A user id, service account or tenant, set by services that act for many users.
The array path and chunk coordinates are added per request by icechunk itself and need no configuration.
Implementations§
Source§impl Attribution
impl Attribution
pub fn new() -> Self
Sourcepub fn with_client(
self,
client: impl Into<String>,
) -> Result<Self, AttributionError>
pub fn with_client( self, client: impl Into<String>, ) -> Result<Self, AttributionError>
Which software is talking to the bucket: the product token of the
application or library that embeds icechunk, name or name/version
in HTTP token characters, e.g. weatherlib/0.9.
Sourcepub fn with_workload(
self,
workload: impl Into<String>,
) -> Result<Self, AttributionError>
pub fn with_workload( self, workload: impl Into<String>, ) -> Result<Self, AttributionError>
What the requests are for: the job, pipeline or deployment running
them, e.g. nightly-ingest. Printable ASCII, at most 128 bytes, none
of (, ), \, ;, =, ".
Sourcepub fn with_principal(
self,
principal: impl Into<String>,
) -> Result<Self, AttributionError>
pub fn with_principal( self, principal: impl Into<String>, ) -> Result<Self, AttributionError>
On whose behalf the requests are made: a user id, service account or
tenant, for services that act for many users. Same rules as
Attribution::with_workload.
pub fn client(&self) -> Option<&str>
pub fn workload(&self) -> Option<&str>
pub fn principal(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for Attribution
impl Clone for Attribution
Source§impl Debug for Attribution
impl Debug for Attribution
Source§impl Default for Attribution
impl Default for Attribution
Source§impl<'de> Deserialize<'de> for Attribution
impl<'de> Deserialize<'de> for Attribution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Attribution
Source§impl From<&Attribution> for AttributionLabels
impl From<&Attribution> for AttributionLabels
Source§fn from(a: &Attribution) -> Self
fn from(a: &Attribution) -> Self
Source§impl PartialEq for Attribution
impl PartialEq for Attribution
Source§impl Serialize for Attribution
impl Serialize for Attribution
impl StructuralPartialEq for Attribution
Auto Trait Implementations§
impl Freeze for Attribution
impl RefUnwindSafe for Attribution
impl Send for Attribution
impl Sync for Attribution
impl Unpin for Attribution
impl UnsafeUnpin for Attribution
impl UnwindSafe for Attribution
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> 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> ⓘ
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> ⓘ
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 more