pub struct FlareNode {
pub metadata_manager: Arc<FlareMetadataManager>,
pub shards: Arc<DashMap<ShardId, Arc<dyn KvShard>>>,
pub addr: String,
pub node_id: u64,
pub shard_factory: Arc<dyn ShardFactory>,
pub client_pool: ClientPool,
/* private fields */
}Fields§
§metadata_manager: Arc<FlareMetadataManager>§shards: Arc<DashMap<ShardId, Arc<dyn KvShard>>>§addr: String§node_id: u64§shard_factory: Arc<dyn ShardFactory>§client_pool: ClientPoolImplementations§
source§impl FlareNode
impl FlareNode
pub async fn new(options: ServerArgs) -> Self
pub fn start_watch_stream(self: Arc<Self>)
pub async fn init_leader(&self) -> Result<(), Box<dyn Error>>
pub async fn join(&self, peer_addr: &str) -> Result<(), Box<dyn Error>>
pub async fn leave(&self)
pub async fn close(&self)
pub async fn sync_shard(&self)
pub async fn get_shard( &self, collection: &str, key: &str, ) -> Result<Arc<dyn KvShard>, FlareError>
pub async fn create_collection( &self, request: CreateCollectionRequest, ) -> Result<CreateCollectionResponse, FlareError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlareNode
impl !RefUnwindSafe for FlareNode
impl Send for FlareNode
impl Sync for FlareNode
impl Unpin for FlareNode
impl !UnwindSafe for FlareNode
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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> 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> 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::Requestsource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.