public RemoteServiceInvoker(IRpcClientFactory factory, IAddressResolver addressResolver, IHealthCheckService healthCheckService, ILogger <RemoteServiceInvoker> logger)
 {
     this._logger             = logger;
     this._clientFactory      = factory;
     this._healthCheckService = healthCheckService;
     this._addressResolver    = addressResolver;
 }
示例#2
0
 public CzarRpcMiddleware(OcelotRequestDelegate next, IRpcClientFactory clientFactory,
                          IOcelotLoggerFactory loggerFactory, ICzarRpcProcessor czarRpcProcessor) : base(loggerFactory.CreateLogger <CzarRpcMiddleware>())
 {
     _next             = next;
     _clientFactory    = clientFactory;
     _czarRpcProcessor = czarRpcProcessor;
 }
示例#3
0
 public Nodes(INodeRepository nodeRepository,
              IEventBus eventBus,
              IRpcClientFactory bitcoindFactory,
              ILogger <Nodes> logger,
              IClock clock
              )
 {
     this.bitcoindFactory = bitcoindFactory ?? throw new ArgumentNullException(nameof(bitcoindFactory));
     this.nodeRepository  = nodeRepository ?? throw new ArgumentNullException(nameof(nodeRepository));
     this.eventBus        = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
     this.logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     this.clock           = clock ?? throw new ArgumentNullException(nameof(clock));
 }
 public ZMQSubscriptionService(ILogger <ZMQSubscriptionService> logger,
                               IOptionsMonitor <AppSettings> options,
                               INodeRepository nodeRepository,
                               IEventBus eventBus,
                               IRpcClientFactory bitcoindFactory,
                               IClock clock)
     : base(logger, eventBus)
 {
     this.appSettings     = options.CurrentValue ?? throw new ArgumentNullException(nameof(options));
     this.nodeRepository  = nodeRepository ?? throw new ArgumentNullException(nameof(nodeRepository));
     this.bitcoindFactory = bitcoindFactory ?? throw new ArgumentNullException(nameof(bitcoindFactory));
     this.clock           = clock ?? throw new ArgumentNullException(nameof(clock));
 }
示例#5
0
        /// <summary>
        /// </summary>
        public CommandContext(IConfigurationRoot config,
                              ILogger logger,
                              IUserOutput userOutput,
                              IRpcClientFactory rpcClientFactory,
                              ICertificateStore certificateStore,
                              ISocketClientRegistry <IRpcClient> socketClientRegistry)
        {
            _logger         = logger;
            _rpcNodeConfigs = RpcClientSettings.BuildRpcNodeSettingList(config);

            SocketClientRegistry = socketClientRegistry;
            PeerId           = GetPeerIdentifierFromCliConfig(config);
            RpcClientFactory = rpcClientFactory;
            CertificateStore = certificateStore;
            UserOutput       = userOutput;
        }
示例#6
0
 public StartupChecker(INodeRepository nodeRepository,
                       INodes nodes,
                       IRpcClientFactory rpcClientFactory,
                       IMinerId minerId,
                       IBlockParser blockParser,
                       IDbManager dbManager,
                       INotificationsHandler notificationsHandler,
                       ILogger <StartupChecker> logger)
 {
     this.rpcClientFactory     = rpcClientFactory ?? throw new ArgumentNullException(nameof(rpcClientFactory));
     this.nodeRepository       = nodeRepository ?? throw new ArgumentNullException(nameof(nodeRepository));
     this.nodes                = nodes ?? throw new ArgumentNullException(nameof(nodes));
     this.logger               = logger ?? throw new ArgumentNullException(nameof(logger));
     this.blockParser          = blockParser ?? throw new ArgumentNullException(nameof(blockParser));
     this.dbManager            = dbManager ?? throw new ArgumentNullException(nameof(dbManager));
     this.minerId              = minerId ?? throw new ArgumentNullException(nameof(nodeRepository));
     this.notificationsHandler = notificationsHandler ?? throw new ArgumentNullException(nameof(notificationsHandler));
 }
示例#7
0
 public StartupChecker(INodeRepository nodeRepository,
                       IRpcClientFactory rpcClientFactory,
                       IMinerId minerId,
                       IBlockParser blockParser,
                       ICreateDB createDB,
                       INotificationsHandler notificationsHandler,
                       ILogger <StartupChecker> logger,
                       IConfiguration configuration)
 {
     this.rpcClientFactory     = rpcClientFactory ?? throw new ArgumentNullException(nameof(rpcClientFactory));
     this.nodeRepository       = nodeRepository ?? throw new ArgumentNullException(nameof(nodeRepository));
     this.logger               = logger ?? throw new ArgumentException(nameof(logger));
     this.blockParser          = blockParser ?? throw new ArgumentException(nameof(blockParser));
     this.createDB             = createDB ?? throw new ArgumentException(nameof(createDB));
     this.minerId              = minerId ?? throw new ArgumentException(nameof(nodeRepository));
     this.notificationsHandler = notificationsHandler ?? throw new ArgumentException(nameof(notificationsHandler));
     rdbms = RDBMS.Postgres;
 }
示例#8
0
 public BlockRetriever(IRpcClientFactory rpc, string publisherAddress)
 {
     this.rpc = rpc;
     this.publisherAddress = publisherAddress;
 }
示例#9
0
 public RpcClientInvokerFactory(IRpcMetadata rpcMetadata, IRpcClientFactory clientFactory, IContentDecoder decoder)
 {
     invokers           = CreateRpcClientInvokers(rpcMetadata.Clients);
     this.clientFactory = clientFactory;
     this.decoder       = decoder;
 }
示例#10
0
 public RpcMultiClient(INodes nodes, IRpcClientFactory rpcClientFactory, ILogger <RpcMultiClient> logger)
 {
     this.nodes            = nodes ?? throw new ArgumentNullException(nameof(nodes));
     this.rpcClientFactory = rpcClientFactory ?? throw new ArgumentNullException(nameof(rpcClientFactory));
     this.logger           = logger;
 }
示例#11
0
 public RpcClientInvokerFactory(IRpcMetadata rpcMetadata, IRpcClientFactory clientFactory)
 {
     invokers           = CreateRpcClientInvokers(rpcMetadata);
     this.clientFactory = clientFactory;
 }