pub struct ShardRuntime { /* private fields */ }Implementations§
Source§impl ShardRuntime
impl ShardRuntime
pub fn spawn(config: RuntimeConfig) -> Result<Self, RuntimeError>
pub fn spawn_with_engine_factory( config: RuntimeConfig, engine_factory: impl GroupEngineFactory, ) -> Result<Self, RuntimeError>
pub fn spawn_with_engine_factory_and_cold_store( config: RuntimeConfig, engine_factory: impl GroupEngineFactory, cold_store: Option<ColdStoreHandle>, ) -> Result<Self, RuntimeError>
pub fn locate(&self, stream_id: &BucketStreamId) -> ShardPlacement
pub fn has_cold_store(&self) -> bool
pub fn cold_store(&self) -> Option<ColdStoreHandle>
pub async fn create_stream( &self, request: CreateStreamRequest, ) -> Result<CreateStreamResponse, RuntimeError>
pub async fn create_stream_external( &self, request: CreateStreamExternalRequest, ) -> Result<CreateStreamResponse, RuntimeError>
pub async fn head_stream( &self, request: HeadStreamRequest, ) -> Result<HeadStreamResponse, RuntimeError>
pub async fn read_stream( &self, request: ReadStreamRequest, ) -> Result<ReadStreamResponse, RuntimeError>
pub async fn publish_snapshot( &self, request: PublishSnapshotRequest, ) -> Result<PublishSnapshotResponse, RuntimeError>
pub async fn read_snapshot( &self, request: ReadSnapshotRequest, ) -> Result<ReadSnapshotResponse, RuntimeError>
pub async fn delete_snapshot( &self, request: DeleteSnapshotRequest, ) -> Result<(), RuntimeError>
pub async fn bootstrap_stream( &self, request: BootstrapStreamRequest, ) -> Result<BootstrapStreamResponse, RuntimeError>
pub async fn wait_read_stream( &self, request: ReadStreamRequest, ) -> Result<ReadStreamResponse, RuntimeError>
pub async fn require_local_live_read_owner( &self, stream_id: &BucketStreamId, ) -> Result<(), RuntimeError>
pub async fn close_stream( &self, request: CloseStreamRequest, ) -> Result<CloseStreamResponse, RuntimeError>
pub async fn delete_stream( &self, request: DeleteStreamRequest, ) -> Result<DeleteStreamResponse, RuntimeError>
pub async fn flush_cold( &self, request: FlushColdRequest, ) -> Result<FlushColdResponse, RuntimeError>
pub async fn append_external( &self, request: AppendExternalRequest, ) -> Result<AppendResponse, RuntimeError>
pub async fn plan_cold_flush( &self, request: PlanColdFlushRequest, ) -> Result<Option<ColdFlushCandidate>, RuntimeError>
pub async fn flush_cold_once( &self, request: PlanColdFlushRequest, ) -> Result<Option<FlushColdResponse>, RuntimeError>
pub async fn plan_next_cold_flush( &self, raft_group_id: RaftGroupId, request: PlanGroupColdFlushRequest, ) -> Result<Option<ColdFlushCandidate>, RuntimeError>
pub async fn plan_next_cold_flush_batch( &self, raft_group_id: RaftGroupId, request: PlanGroupColdFlushRequest, max_candidates: usize, ) -> Result<Vec<ColdFlushCandidate>, RuntimeError>
pub async fn flush_cold_group_once( &self, raft_group_id: RaftGroupId, request: PlanGroupColdFlushRequest, ) -> Result<Option<FlushColdResponse>, RuntimeError>
pub async fn flush_cold_group_batch_once( &self, raft_group_id: RaftGroupId, request: PlanGroupColdFlushRequest, max_candidates: usize, ) -> Result<Vec<FlushColdResponse>, RuntimeError>
pub async fn flush_cold_all_groups_once( &self, request: PlanGroupColdFlushRequest, ) -> Result<usize, RuntimeError>
pub async fn flush_cold_all_groups_once_bounded( &self, request: PlanGroupColdFlushRequest, max_concurrency: usize, ) -> Result<usize, RuntimeError>
pub async fn append( &self, request: AppendRequest, ) -> Result<AppendResponse, RuntimeError>
pub async fn append_batch( &self, request: AppendBatchRequest, ) -> Result<AppendBatchResponse, RuntimeError>
pub async fn snapshot_group( &self, raft_group_id: RaftGroupId, ) -> Result<GroupSnapshot, RuntimeError>
pub async fn install_group_snapshot( &self, snapshot: GroupSnapshot, ) -> Result<(), RuntimeError>
pub async fn warm_group( &self, raft_group_id: RaftGroupId, ) -> Result<ShardPlacement, RuntimeError>
pub async fn warm_all_groups(&self) -> Result<(), RuntimeError>
pub fn metrics(&self) -> RuntimeMetrics
pub fn mailbox_snapshot(&self) -> RuntimeMailboxSnapshot
Trait Implementations§
Source§impl Clone for ShardRuntime
impl Clone for ShardRuntime
Source§fn clone(&self) -> ShardRuntime
fn clone(&self) -> ShardRuntime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShardRuntime
impl !RefUnwindSafe for ShardRuntime
impl Send for ShardRuntime
impl Sync for ShardRuntime
impl Unpin for ShardRuntime
impl UnsafeUnpin for ShardRuntime
impl !UnwindSafe for ShardRuntime
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