mod.rs

Overview

This file serves as a central module aggregator and re-exporter for various components related to state synchronization services within the system. It consolidates multiple submodules, making their functionalities accessible via a unified interface. The file also declares a constant key used for API address advertisement in gossip protocols.

Modules and Re-exports

state_sync_service_trait

external_fileshares_based

stub

file_saving_service

Constants

Interaction with Other Parts of the System

Example Usage

use mod::StateSyncService;
use mod::ExternalFileSharesBased;

fn main() {
    let sync_service = ExternalFileSharesBased::new();
    sync_service.start_sync();
}

This snippet demonstrates instantiating the external file shares-based synchronization service and starting the synchronization process. The actual instantiation and method names depend on the implementations found in the respective modules.

Implementation Details


classDiagram
class StateSyncService {
<<trait>>
+start_sync()
+stop_sync()
+sync_status() bool
}
class ExternalFileSharesBased {
+new()
+start_sync()
+stop_sync()
+sync_status() bool
}
class StateSyncServiceStub {
+new()
+start_sync()
+stop_sync()
+sync_status() bool
}
class FileSavingService {
+save_file()
+load_file()
}
StateSyncService <|.. ExternalFileSharesBased
StateSyncService <|.. StateSyncServiceStub
ExternalFileSharesBased --> FileSavingService : uses

This diagram illustrates the relationship between the StateSyncService trait and its implementations, as well as the dependency of ExternalFileSharesBased on the FileSavingService. Methods shown are representative and indicate the typical interface expected from these entities.