public async ValueTask <INodeExplorer> CreateAsync(string configPath, NodeExplorerOptions options, IObjectStoreFactory objectStoreFactory, IConnectionController connectionController, IPublishStorage publishStorage, IWantStorage wantStorage, IBytesPool bytesPool) { var result = new NodeExplorer(configPath, options, objectStoreFactory, connectionController, publishStorage, wantStorage, bytesPool); await result.InitAsync(); return(result); }
internal BlockExchanger(string configPath, BlockExchangerOptions options, IObjectStoreFactory objectStoreFactory, IConnectionController connectionController, INodeExplorer nodeExplorer, IPublishStorage publishStorage, IWantStorage wantStorage, IBytesPool bytesPool) { _configPath = configPath; _options = options; _objectStoreFactory = objectStoreFactory; _connectionController = connectionController; _nodeExplorer = nodeExplorer; _publishStorage = publishStorage; _wantStorage = wantStorage; _bytesPool = bytesPool; }
internal NodeExplorer(string configPath, NodeExplorerOptions options, IObjectStoreFactory objectStoreFactory, IConnectionController connectionController, IPublishStorage publishStorage, IWantStorage wantStorage, IBytesPool bytesPool) { _configPath = configPath; _options = options; _objectStoreFactory = objectStoreFactory; _connectionController = connectionController; _publishStorage = publishStorage; _wantStorage = wantStorage; _bytesPool = bytesPool; { var id = new byte[32]; using var random = RandomNumberGenerator.Create(); random.GetBytes(id); _myId = id; } }
internal WantStorage(string configPath, WantStorageOptions options, IObjectStoreFactory objectStoreFactory, IBytesPool bytesPool) { _configPath = configPath; _bytesPool = bytesPool; }
public async ValueTask <IWantStorage> CreateAsync(string configPath, WantStorageOptions options, IObjectStoreFactory objectStoreFactory, IBytesPool bytesPool) { var result = new WantStorage(configPath, options, objectStoreFactory, bytesPool); await result.InitAsync(); return(result); }