pub struct MonitoredObjectStore<OS: ObjectStore> {
inner: OS,
object_store_metrics: Arc<ObjectStoreMetrics>,
config: Arc<ObjectStoreConfig>,
}
Fields§
§inner: OS
§object_store_metrics: Arc<ObjectStoreMetrics>
§config: Arc<ObjectStoreConfig>
Implementations§
source§impl<OS: ObjectStore> MonitoredObjectStore<OS>
impl<OS: ObjectStore> MonitoredObjectStore<OS>
Manually dispatch trait methods.
The metrics are updated in the following order:
- Write operations
write_bytes
operation_size
- start
operation_latency
timer failure_count
- Read operations
- start
operation_latency
timer failure-count
read_bytes
operation_size
- start
- Other
- start
operation_latency
timer failure-count
- start
pub fn new( store: OS, object_store_metrics: Arc<ObjectStoreMetrics>, config: Arc<ObjectStoreConfig>, ) -> Self
fn media_type(&self) -> &'static str
pub fn inner(&self) -> &OS
pub fn mut_inner(&mut self) -> &mut OS
pub async fn upload(&self, path: &str, obj: Bytes) -> ObjectResult<()>
pub async fn streaming_upload( &self, path: &str, ) -> ObjectResult<MonitoredStreamingUploader<OS::StreamingUploader>>
pub async fn read( &self, path: &str, range: impl ObjectRangeBounds, ) -> ObjectResult<Bytes>
sourceasync fn streaming_read(
&self,
path: &str,
range: Range<usize>,
) -> ObjectResult<MonitoredStreamingReader>
async fn streaming_read( &self, path: &str, range: Range<usize>, ) -> ObjectResult<MonitoredStreamingReader>
Returns a stream reading the object specified in path
. If given, the stream starts at the
byte with index start_pos
(0-based). As far as possible, the stream only loads the amount
of data into memory that is read from the stream.
pub async fn metadata(&self, path: &str) -> ObjectResult<ObjectMetadata>
pub async fn delete(&self, path: &str) -> ObjectResult<()>
async fn delete_objects(&self, paths: &[String]) -> ObjectResult<()>
pub async fn list( &self, prefix: &str, start_after: Option<String>, limit: Option<usize>, ) -> ObjectResult<ObjectMetadataIter>
Auto Trait Implementations§
impl<OS> Freeze for MonitoredObjectStore<OS>where
OS: Freeze,
impl<OS> !RefUnwindSafe for MonitoredObjectStore<OS>
impl<OS> Send for MonitoredObjectStore<OS>
impl<OS> Sync for MonitoredObjectStore<OS>
impl<OS> Unpin for MonitoredObjectStore<OS>where
OS: Unpin,
impl<OS> !UnwindSafe for MonitoredObjectStore<OS>
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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> 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>
Converts
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>
Converts
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 moresource§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>
Wrap the input message
T
in a tonic::Request
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Creates a shared type from an unshared type.
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level
.source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
.source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
with metric_level
set to
MetricLevel::Debug
and relabel_num
set to 1.