pub struct ResourceStore { /* private fields */ }Expand description
Resource store for the control plane
Implementations§
Source§impl ResourceStore
impl ResourceStore
Sourcepub fn create(
&self,
kind: ResourceKind,
key: &str,
value: Value,
) -> Result<u64, StoreError>
pub fn create( &self, kind: ResourceKind, key: &str, value: Value, ) -> Result<u64, StoreError>
Create resource
Sourcepub fn update(
&self,
kind: ResourceKind,
key: &str,
value: Value,
expected_version: Option<u64>,
) -> Result<u64, StoreError>
pub fn update( &self, kind: ResourceKind, key: &str, value: Value, expected_version: Option<u64>, ) -> Result<u64, StoreError>
Update resource
Sourcepub fn delete(&self, kind: &ResourceKind, key: &str) -> Result<(), StoreError>
pub fn delete(&self, kind: &ResourceKind, key: &str) -> Result<(), StoreError>
Delete resource
Sourcepub fn list(&self, kind: &ResourceKind, namespace: Option<&str>) -> Vec<Value>
pub fn list(&self, kind: &ResourceKind, namespace: Option<&str>) -> Vec<Value>
List resources of a kind
Sourcepub fn watch(&self, kind: ResourceKind) -> WatchStream
pub fn watch(&self, kind: ResourceKind) -> WatchStream
Subscribe to watch events
Sourcepub fn current_version(&self) -> u64
pub fn current_version(&self) -> u64
Get current resource version
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ResourceStore
impl !RefUnwindSafe for ResourceStore
impl Send for ResourceStore
impl Sync for ResourceStore
impl Unpin for ResourceStore
impl !UnwindSafe for ResourceStore
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
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 more