public KapacitorClientConfiguration(Uri endpointUri, string username, string password, KapacitorVersion kapacitorVersion)
        {
            Validate.IsNotNull(endpointUri, "Endpoint may not be null or empty.");
            //Validate.IsNotNullOrEmpty(password, "Password may not be null or empty.");
            //Validate.IsNotNullOrEmpty(username, "Username may not be null or empty.");

            EndpointUri      = SanitizeEndpoint(endpointUri, false);
            Username         = username;
            Password         = password;
            KapacitorVersion = kapacitorVersion;
        }
Esempio n. 2
0
        protected IntegrationFixtureBase(
            string influxDbEndpointUriKey,
            InfluxDbVersion influxDbVersion,
            string kapacitorEndpointUriKey,
            KapacitorVersion kapacitorVersion)
            : base("FakeKapacitorDb", influxDbEndpointUriKey, influxDbVersion, false)
        {
            this.Sut = new KapacitorClient(
                ConfigurationManager.Get(kapacitorEndpointUriKey),
                kapacitorVersion);

            this.Sut.Should().NotBeNull();
        }
        public KapacitorClientConfiguration(Uri endpointUri, string username, string password, KapacitorVersion kapacitorVersion, HttpClient httpClient = null, bool throwOnWarning = false)
        {
            Validate.IsNotNull(endpointUri, "Endpoint may not be null or empty.");
            //Validate.IsNotNullOrEmpty(password, "Password may not be null or empty.");
            //Validate.IsNotNullOrEmpty(username, "Username may not be null or empty.");

            EndpointUri      = SanitizeEndpoint(endpointUri, false);
            Username         = username;
            Password         = password;
            KapacitorVersion = kapacitorVersion;
            HttpClient       = httpClient ?? new HttpClient();
            ThrowOnWarning   = throwOnWarning;
        }
Esempio n. 4
0
 public KapacitorClient(string uri, KapacitorVersion kapacitorVersion, HttpClient httpClient = null)
     : this(new KapacitorClientConfiguration(new Uri(uri), null, null, kapacitorVersion, httpClient))
 {
 }
Esempio n. 5
0
 public KapacitorClient(string uri, KapacitorVersion kapacitorVersion, HttpClient httpClient = null, bool throwOnWarning = false)
     : this(new KapacitorClientConfiguration(new Uri(uri), null, null, kapacitorVersion, httpClient, throwOnWarning))
 {
 }
 public KapacitorClient(string uri, KapacitorVersion kapacitorVersion)
     : this(new KapacitorClientConfiguration(new Uri(uri), null, null, kapacitorVersion))
 {
 }