Struct garage_rpc::system::System
source · pub struct System {
pub id: Uuid,
pub netapp: Arc<NetApp>,
pub rpc: RpcHelper,
pub ring: Receiver<Arc<Ring>>,
pub background: Arc<BackgroundRunner>,
pub metadata_dir: PathBuf,
/* private fields */
}
Expand description
This node’s membership manager
Fields§
§id: Uuid
The id of this node
netapp: Arc<NetApp>
§rpc: RpcHelper
§ring: Receiver<Arc<Ring>>
The ring
background: Arc<BackgroundRunner>
The job runner of this node
metadata_dir: PathBuf
Path to metadata directory
Implementations§
source§impl System
impl System
sourcepub fn new(
network_key: NetworkKey,
background: Arc<BackgroundRunner>,
replication_mode: ReplicationMode,
config: &Config
) -> Result<Arc<Self>, Error>
pub fn new(
network_key: NetworkKey,
background: Arc<BackgroundRunner>,
replication_mode: ReplicationMode,
config: &Config
) -> Result<Arc<Self>, Error>
Create this node’s membership manager
sourcepub async fn run(self: Arc<Self>, must_exit: Receiver<bool>)
pub async fn run(self: Arc<Self>, must_exit: Receiver<bool>)
Perform bootstraping, starting the ping loop