pub struct SutureHubServer { /* private fields */ }Implementations§
Source§impl SutureHubServer
impl SutureHubServer
pub fn new() -> Self
pub fn new_in_memory() -> Self
pub fn with_db(path: &Path) -> Result<Self, StorageError>
pub fn set_no_auth(&mut self, no_auth: bool)
pub fn is_no_auth(&self) -> bool
pub fn storage(&self) -> &Arc<RwLock<HubStorage>>
pub fn shutdown(&self)
Sourcepub async fn is_leader(&self) -> bool
pub async fn is_leader(&self) -> bool
Check if this node is the leader (no-op when Raft is disabled).
pub fn set_rate_limit_config( &mut self, pushes: u32, pulls: u32, window: Duration, )
pub fn with_lfs_dir(self, path: PathBuf) -> Self
pub fn set_replication_role(&self, role: &str)
pub fn get_replication_role(&self) -> String
pub fn set_blob_backend(&mut self, backend: Arc<dyn BlobBackend>)
pub async fn log_write( &self, operation: &str, table_name: &str, row_id: &str, data: Option<&str>, ) -> Result<i64, StorageError>
pub async fn handle_add_peer(&self, req: AddPeerRequest) -> AddPeerResponse
pub async fn handle_remove_peer(&self, id: i64) -> RemovePeerResponse
pub async fn handle_list_peers(&self) -> ListPeersResponse
pub async fn handle_replication_status(&self) -> ReplicationStatusResponse
pub async fn handle_replication_sync( &self, entries: Vec<ReplicationEntry>, ) -> SyncResponse
pub fn check_rate_limit(&self, ip: &str, key: &str) -> Result<(), u64>
pub async fn handle_repo_patches_cursor( &self, repo_id: &str, offset: u64, limit: u32, ) -> (Vec<PatchProto>, Option<String>)
pub async fn handle_push( &self, req: PushRequest, ) -> Result<PushResponse, (StatusCode, PushResponse)>
pub async fn handle_pull(&self, req: PullRequest) -> PullResponse
pub async fn handle_list_repos(&self) -> ListReposResponse
pub async fn handle_repo_info(&self, repo_id: &str) -> RepoInfoResponse
pub async fn handle_mirror_setup( &self, req: MirrorSetupRequest, ) -> MirrorSetupResponse
pub async fn handle_mirror_sync( &self, req: MirrorSyncRequest, ) -> MirrorSyncResponse
pub async fn handle_mirror_status( &self, req: MirrorStatusRequest, ) -> MirrorStatusResponse
pub async fn handle_pull_v2(&self, req: PullRequestV2) -> PullResponseV2
pub async fn handle_push_v2( &self, req: PushRequestV2, ) -> Result<PushResponse, (StatusCode, PushResponse)>
pub async fn handle_batch_push( &self, req: BatchPatchRequest, ) -> Result<PushResponse, (StatusCode, PushResponse)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SutureHubServer
impl !RefUnwindSafe for SutureHubServer
impl Send for SutureHubServer
impl Sync for SutureHubServer
impl Unpin for SutureHubServer
impl UnsafeUnpin for SutureHubServer
impl !UnwindSafe for SutureHubServer
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> 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