sgns::crdt::GlobalDbNetworkComposition¶
Owns the minimal production networking stack required by GlobalDB. More...
#include <GlobalDbNetworkComposition.hpp>
Public Classes¶
| Name | |
|---|---|
| struct | Config |
Public Types¶
| Name | |
|---|---|
| enum class uint8_t | Error |
Public Functions¶
| Name | |
|---|---|
| outcome::result< std::shared_ptr< GlobalDbNetworkComposition > > | Create(Config config) Validates configuration and creates a stopped composition. |
| GlobalDbNetworkComposition(const GlobalDbNetworkComposition & ) =delete | |
| GlobalDbNetworkComposition & | operator=(const GlobalDbNetworkComposition & ) =delete |
| ~GlobalDbNetworkComposition() | |
| outcome::result< void > | Start() Starts PubSub and GlobalDB; GraphSync runs on PubSub's io_context. |
| void | Stop() Stops and releases owned resources in reverse dependency order. |
| std::shared_ptr< GlobalDB > | db() const Returns the running GlobalDB instance, or nullptr before Start/after Stop. |
| std::string | interface_address() const Returns the running PubSub interface address for bootstrap configuration. |
Detailed Description¶
Owns the minimal production networking stack required by GlobalDB.
This composition is intentionally independent from GeniusNode and account ownership. Its libp2p identity is stored beneath the configured database path and is used only for CRDT transport.
Public Types Documentation¶
enum Error¶
| Enumerator | Value | Description |
|---|---|---|
| INVALID_CONFIG | 0 | |
| NETWORK_CONFIG_IO | ||
| NETWORK_CONFIG_PARSE | ||
| KEYPAIR_LOAD_FAILED | ||
| PUBSUB_START_FAILED | ||
| GLOBALDB_CREATE_FAILED | ||
| TOPIC_CONFIGURATION_FAILED |
Public Functions Documentation¶
function Create¶
Validates configuration and creates a stopped composition.
Parameters:
- config Network configuration, datastore path, existing CRDT topics, and logger.
function GlobalDbNetworkComposition¶
function operator=¶
function ~GlobalDbNetworkComposition¶
function Start¶
Starts PubSub and GlobalDB; GraphSync runs on PubSub's io_context.
function Stop¶
Stops and releases owned resources in reverse dependency order.
function db¶
Returns the running GlobalDB instance, or nullptr before Start/after Stop.
function interface_address¶
Returns the running PubSub interface address for bootstrap configuration.
Updated on 2026-09-25 at 15:46:10 +0000