Beispiel #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="requestClient"></param>
 /// <param name="databaseQueryBuilder"></param>
 /// <param name="databaseResponseParser"></param>
 public DatabaseClientModule(IInfluxDbRequestClient requestClient,
                             IDatabaseQueryBuilder databaseQueryBuilder, IDatabaseResponseParser databaseResponseParser)
     : base(requestClient)
 {
     _databaseQueryBuilder   = databaseQueryBuilder;
     _databaseResponseParser = databaseResponseParser;
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="requestClient"></param>
 /// <param name="cqQueryBuilder"></param>
 /// <param name="cqResponseParser"></param>
 public CqClientModule(IInfluxDbRequestClient requestClient,
                       ICqQueryBuilder cqQueryBuilder, ICqResponseParser cqResponseParser)
     : base(requestClient)
 {
     _cqQueryBuilder   = cqQueryBuilder;
     _cqResponseParser = cqResponseParser;
 }
Beispiel #3
0
        /// <summary>
        /// The default (latest supported) dependency chain setup.
        /// </summary>
        /// <param name="configuration">InfluxDb client configuration.</param>
        protected virtual void BootstrapInfluxDbLatest(IInfluxDbClientConfiguration configuration)
        {
            _requestClient = new InfluxDbRequestClient(configuration);

            // NOTE: once a breaking change occures, QueryBuilders will need to be resolved with factories
            _serieQueryBuilder       = new Lazy <ISerieQueryBuilder>(() => new SerieQueryBuilder(), true);
            _databaseQueryBuilder    = new Lazy <IDatabaseQueryBuilder>(() => new DatabaseQueryBuilder(), true);
            _retentionQueryBuilder   = new Lazy <IRetentionQueryBuilder>(() => new RetentionQueryBuilder(), true);
            _cqQueryBuilder          = new Lazy <ICqQueryBuilder>(() => new CqQueryBuilder(), true);
            _diagnosticsQueryBuilder = new Lazy <IDiagnosticsQueryBuilder>(() => new DiagnosticsQueryBuilder(), true);
            _userQueryBuilder        = new Lazy <IUserQueryBuilder>(() => new UserQueryBuilder(), true);

            // NOTE: once a breaking change occures, Parsers will need to be resolved with factories
            _basicResponseParser       = new Lazy <IBasicResponseParser>(() => new BasicResponseParser(), true);
            _serieResponseParser       = new Lazy <ISerieResponseParser>(() => new SerieResponseParser(), true);
            _databaseResponseParser    = new Lazy <IDatabaseResponseParser>(() => new DatabaseResponseParser(), true);
            _retentionResponseParser   = new Lazy <IRetentionResponseParser>(() => new RetentionResponseParser(), true);
            _cqResponseParser          = new Lazy <ICqResponseParser>(() => new CqResponseParser(), true);
            _diagnosticsResponseParser = new Lazy <IDiagnosticsResponseParser>(() => new DiagnosticsResponseParser(), true);
            _userResponseParser        = new Lazy <IUserResponseParser>(() => new UserResponseParser(), true);

            // NOTE: once a breaking change occures, ClientModules will need to be resolved with factories
            _basicClientModule = new Lazy <IBasicClientModule>(() => new BasicClientModule(_requestClient, _basicResponseParser.Value));
            var batchWriter = new Lazy <IBatchWriterFactory>(() => new BatchWriter(_basicClientModule.Value));

            _serieClientModule       = new Lazy <ISerieClientModule>(() => new SerieClientModule(_requestClient, _serieQueryBuilder.Value, _serieResponseParser.Value, batchWriter.Value));
            _databaseClientModule    = new Lazy <IDatabaseClientModule>(() => new DatabaseClientModule(_requestClient, _databaseQueryBuilder.Value, _databaseResponseParser.Value));
            _retentionClientModule   = new Lazy <IRetentionClientModule>(() => new RetentionClientModule(_requestClient, _retentionQueryBuilder.Value, _retentionResponseParser.Value));
            _cqClientModule          = new Lazy <ICqClientModule>(() => new CqClientModule(_requestClient, _cqQueryBuilder.Value, _cqResponseParser.Value));
            _diagnosticsClientModule = new Lazy <IDiagnosticsClientModule>(() => new DiagnosticsClientModule(_requestClient, _diagnosticsQueryBuilder.Value, _diagnosticsResponseParser.Value));
            _userClientModule        = new Lazy <IUserClientModule>(() => new UserClientModule(_requestClient, _userQueryBuilder.Value, _userResponseParser.Value));
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="requestClient"></param>
 /// <param name="diagnosticsQueryBuilder"></param>
 /// <param name="diagnosticsResponseParser"></param>
 public DiagnosticsClientModule(IInfluxDbRequestClient requestClient,
                                IDiagnosticsQueryBuilder diagnosticsQueryBuilder, IDiagnosticsResponseParser diagnosticsResponseParser)
     : base(requestClient)
 {
     _diagnosticsQueryBuilder   = diagnosticsQueryBuilder;
     _diagnosticsResponseParser = diagnosticsResponseParser;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="requestClient"></param>
 /// <param name="retentionQueryBuilder"></param>
 /// <param name="retentionResponseParser"></param>
 public RetentionClientModule(IInfluxDbRequestClient requestClient,
                              IRetentionQueryBuilder retentionQueryBuilder, IRetentionResponseParser retentionResponseParser)
     : base(requestClient)
 {
     _retentionQueryBuilder   = retentionQueryBuilder;
     _retentionResponseParser = retentionResponseParser;
 }
Beispiel #6
0
 public SerieClientModule(IInfluxDbRequestClient requestClient, ISerieQueryBuilder serieQueryBuilder, ISerieResponseParser serieResponseParser, IBatchWriter batchWriter)
     : base(requestClient)
 {
     _serieQueryBuilder   = serieQueryBuilder;
     _serieResponseParser = serieResponseParser;
     _batchWriter         = batchWriter;
 }
        public InfluxDbClient(IInfluxDbClientConfiguration configuration)
        {
            var requestClientFactory = new InfluxDbClientBootstrap(configuration);
            var dependencies         = requestClientFactory.GetClientDependencies();

            _requestClient = dependencies.RequestClient;

            // NOTE: once a breaking change occures, QueryBuilders will need to be resolved with factories
            _serieQueryBuilder       = new Lazy <ISerieQueryBuilder>(() => new SerieQueryBuilder(), true);
            _databaseQueryBuilder    = new Lazy <IDatabaseQueryBuilder>(() => new DatabaseQueryBuilder(), true);
            _retentionQueryBuilder   = new Lazy <IRetentionQueryBuilder>(() => new RetentionQueryBuilder(), true);
            _cqQueryBuilder          = new Lazy <ICqQueryBuilder>(() => dependencies.CqQueryBuilder, true);
            _diagnosticsQueryBuilder = new Lazy <IDiagnosticsQueryBuilder>(() => new DiagnosticsQueryBuilder(), true);

            // NOTE: once a breaking change occures, Parsers will need to be resolved with factories
            _basicResponseParser       = new Lazy <IBasicResponseParser>(() => new BasicResponseParser(), true);
            _serieResponseParser       = new Lazy <ISerieResponseParser>(() => dependencies.SerieResponseParser, true);
            _databaseResponseParser    = new Lazy <IDatabaseResponseParser>(() => new DatabaseResponseParser(), true);
            _retentionResponseParser   = new Lazy <IRetentionResponseParser>(() => new RetentionResponseParser(), true);
            _cqResponseParser          = new Lazy <ICqResponseParser>(() => new CqResponseParser(), true);
            _diagnosticsResponseParser = new Lazy <IDiagnosticsResponseParser>(() => new DiagnosticsParser(), true);

            // NOTE: once a breaking change occures, ClientModules will need to be resolved with factories
            _basicClientModule       = new Lazy <IBasicClientModule>(() => new BasicClientModule(_requestClient, _basicResponseParser.Value));
            _serieClientModule       = new Lazy <ISerieClientModule>(() => new SerieClientModule(_requestClient, _serieQueryBuilder.Value, _serieResponseParser.Value));
            _databaseClientModule    = new Lazy <IDatabaseClientModule>(() => new DatabaseClientModule(_requestClient, _databaseQueryBuilder.Value, _databaseResponseParser.Value));
            _retentionClientModule   = new Lazy <IRetentionClientModule>(() => new RetentionClientModule(_requestClient, _retentionQueryBuilder.Value, _retentionResponseParser.Value));
            _cqClientModule          = new Lazy <ICqClientModule>(() => new CqClientModule(_requestClient, _cqQueryBuilder.Value, _cqResponseParser.Value));
            _diagnosticsClientModule = new Lazy <IDiagnosticsClientModule>(() => new DiagnosticsClientModule(_requestClient, _diagnosticsQueryBuilder.Value, _diagnosticsResponseParser.Value));
        }
 public UserClientModule(
     IInfluxDbRequestClient requestClient,
     IUserQueryBuilder userQueryBuilder,
     IUserResponseParser userResponseParser)
     : base(requestClient)
 {
     _userQueryBuilder   = userQueryBuilder;
     _userResponseParser = userResponseParser;
 }
Beispiel #9
0
        /// <summary>
        /// v0.9.6 and older dependency chain setup.
        /// </summary>
        /// <param name="configuration">InfluxDb client configuration.</param>
        protected virtual void BootstrapInfluxDb_v_0_9_6(IInfluxDbClientConfiguration configuration)
        {
            _requestClient = new InfluxDbRequestClient_v_0_9_6(configuration);

            _cqQueryBuilder = new Lazy <ICqQueryBuilder>(() => new CqQueryBuilder_v_0_9_6(), true);

            _serieResponseParser = new Lazy <ISerieResponseParser>(() => new SerieResponseParser_v_0_9_6(), true);

            _databaseClientModule = new Lazy <IDatabaseClientModule>(() => new DatabaseClientModule_v_0_9_6(_requestClient, _databaseQueryBuilder.Value, _databaseResponseParser.Value));
            _cqClientModule       = new Lazy <ICqClientModule>(() => new CqClientModule_v_0_9_6(_requestClient, _cqQueryBuilder.Value, _cqResponseParser.Value));
        }
Beispiel #10
0
        public InfluxDbClient(IInfluxDbClientConfiguration configuration)
        {
            var requestClientFactory = new RequestClientFactory(configuration);
            _requestClient = requestClientFactory.GetRequestClient();

            // NOTE: once a breaking change occures, RequestModules will need to be resolved with factories
            _basicRequestModule = new Lazy<IBasicRequestModule>(() => new BasicRequestModule(_requestClient), true);
            _databaseRequestModule = new Lazy<IDatabaseRequestModule>(() => new DatabaseRequestModule(_requestClient), true);
            _retentionRequestModule = new Lazy<IRetentionRequestModule>(() => new RetentionRequestModule(_requestClient), true);
            _cqRequestModule = new Lazy<ICqRequestModule>(() => new CqRequestModule(_requestClient), true);

            // NOTE: once a breaking change occures, ClientModules will need to be resolved with factories
            _basicClientModule = new Lazy<IBasicClientModule>(() => new BasicClientModule(_requestClient, _basicRequestModule.Value));
            _databaseClientModule = new Lazy<IDatabaseClientModule>(() => new DatabaseClientModule(_requestClient, _databaseRequestModule.Value));
            _retentionClientModule = new Lazy<IRetentionClientModule>(() => new RetentionClientModule(_requestClient, _retentionRequestModule.Value));
            _cqClientModule = new Lazy<ICqClientModule>(() => new CqClientModule(_requestClient, _cqRequestModule.Value));
        }
Beispiel #11
0
        public InfluxDbClient(IInfluxDbClientConfiguration configuration)
        {
            var requestClientFactory = new RequestClientFactory(configuration);

            _requestClient = requestClientFactory.GetRequestClient();

            // NOTE: once a breaking change occures, RequestModules will need to be resolved with factories
            _basicRequestModule     = new Lazy <IBasicRequestModule>(() => new BasicRequestModule(_requestClient), true);
            _databaseRequestModule  = new Lazy <IDatabaseRequestModule>(() => new DatabaseRequestModule(_requestClient), true);
            _retentionRequestModule = new Lazy <IRetentionRequestModule>(() => new RetentionRequestModule(_requestClient), true);
            _cqRequestModule        = new Lazy <ICqRequestModule>(() => new CqRequestModule(_requestClient), true);

            // NOTE: once a breaking change occures, ClientModules will need to be resolved with factories
            _basicClientModule     = new Lazy <IBasicClientModule>(() => new BasicClientModule(_requestClient, _basicRequestModule.Value));
            _databaseClientModule  = new Lazy <IDatabaseClientModule>(() => new DatabaseClientModule(_requestClient, _databaseRequestModule.Value));
            _retentionClientModule = new Lazy <IRetentionClientModule>(() => new RetentionClientModule(_requestClient, _retentionRequestModule.Value));
            _cqClientModule        = new Lazy <ICqClientModule>(() => new CqClientModule(_requestClient, _cqRequestModule.Value));
        }
Beispiel #12
0
 public CqRequestModule(IInfluxDbRequestClient requestClient)
     : base(requestClient)
 {
 }
Beispiel #13
0
 public DatabaseClientModule(IInfluxDbRequestClient requestClient, IDatabaseRequestModule databaseRequestModule)
     : base(requestClient)
 {
     _databaseRequestModule = databaseRequestModule;
 }
 public DatabaseRequestModule(IInfluxDbRequestClient requestClient)
     : base(requestClient)
 {
 }
Beispiel #15
0
 /// <summary>
 /// v0.9.2 and older dependency chain setup.
 /// </summary>
 /// <param name="configuration">InfluxDb client configuration.</param>
 protected virtual void BootstrapInfluxDb_v_0_9_2(IInfluxDbClientConfiguration configuration)
 {
     _requestClient = new InfluxDbRequestClient_v_0_9_2(configuration);
 }
Beispiel #16
0
 public ClientModuleBase(IInfluxDbRequestClient requestClient)
 {
     _requestClient = requestClient;
 }
 public DatabaseClientModule(IInfluxDbRequestClient requestClient, IDatabaseRequestModule databaseRequestModule)
     : base(requestClient)
 {
     _databaseRequestModule = databaseRequestModule;
 }
 public RequestModuleBase(IInfluxDbRequestClient requestClient)
 {
     this.RequestClient = requestClient;
 }
 public RetentionClientModule(IInfluxDbRequestClient requestClient, IRetentionRequestModule databaseRequestModule)
     : base(requestClient)
 {
     _retentionRequestModule = databaseRequestModule;
 }
Beispiel #20
0
 public RetentionRequestModule(IInfluxDbRequestClient requestClient)
     : base(requestClient)
 {
 }
Beispiel #21
0
 public CqClientModule(IInfluxDbRequestClient requestClient, ICqRequestModule cqRequestModule)
     : base(requestClient)
 {
     _cqRequestModule = cqRequestModule;
 }
 public BasicClientModule(IInfluxDbRequestClient requestClient, IBasicRequestModule basicRequestModule)
     : base(requestClient)
 {
     _basicRequestModule = basicRequestModule;
 }
 public DatabaseRequestModule(IInfluxDbRequestClient requestClient) 
     : base(requestClient)
 {
 }
Beispiel #24
0
 public CqClientModule(IInfluxDbRequestClient requestClient, ICqRequestModule cqRequestModule)
     : base(requestClient)
 {
     _cqRequestModule = cqRequestModule;
 }
Beispiel #25
0
 public CqRequestModule(IInfluxDbRequestClient requestClient) 
     : base(requestClient)
 {
 }
 public RetentionRequestModule(IInfluxDbRequestClient requestClient) 
     : base(requestClient)
 {
 }
 public BasicClientModule(IInfluxDbRequestClient requestClient, IBasicResponseParser basicResponseParser)
     : base(requestClient)
 {
     _basicResponseParser = basicResponseParser;
 }
 public BasicClientModule(IInfluxDbRequestClient requestClient, IBasicRequestModule basicRequestModule)
     : base(requestClient)
 {
     _basicRequestModule = basicRequestModule;
 }
Beispiel #29
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="requestClient"></param>
 public ClientModuleBase(IInfluxDbRequestClient requestClient)
 {
     this.RequestClient = requestClient;
 }
 public RetentionClientModule(IInfluxDbRequestClient requestClient, IRetentionRequestModule databaseRequestModule)
     : base(requestClient)
 {
     _retentionRequestModule = databaseRequestModule;
 }