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