KayentaConfig(Canary canary) { for (AbstractCanaryServiceIntegration svc : canary.getServiceIntegrations()) { if (svc instanceof GoogleCanaryServiceIntegration) { GoogleCanaryServiceIntegration googleSvc = (GoogleCanaryServiceIntegration)svc; google = new GoogleConfig(googleSvc); stackdriver = new StackdriverConfig(googleSvc); gcs = new GcsConfig(googleSvc); } else if (svc instanceof PrometheusCanaryServiceIntegration) { PrometheusCanaryServiceIntegration prometheusSvc = (PrometheusCanaryServiceIntegration)svc; prometheus = new PrometheusConfig(prometheusSvc); } else if (svc instanceof DatadogCanaryServiceIntegration) { DatadogCanaryServiceIntegration datadogSvc = (DatadogCanaryServiceIntegration)svc; datadog = new DatadogConfig(datadogSvc); } else if (svc instanceof AwsCanaryServiceIntegration) { AwsCanaryServiceIntegration awsSvc = (AwsCanaryServiceIntegration)svc; aws = new AwsConfig(awsSvc); s3 = new S3Config(awsSvc); } else if (svc instanceof SignalfxCanaryServiceIntegration) { SignalfxCanaryServiceIntegration signalfxSvc = (SignalfxCanaryServiceIntegration)svc; signalfx = new SignalFxConfig(signalfxSvc); } } }
KayentaConfig(Canary canary) { for (AbstractCanaryServiceIntegration svc : canary.getServiceIntegrations()) { if (svc instanceof GoogleCanaryServiceIntegration) { GoogleCanaryServiceIntegration googleSvc = (GoogleCanaryServiceIntegration)svc; google = new GoogleConfig(googleSvc); stackdriver = new StackdriverConfig(googleSvc); gcs = new GcsConfig(googleSvc); } else if (svc instanceof PrometheusCanaryServiceIntegration) { PrometheusCanaryServiceIntegration prometheusSvc = (PrometheusCanaryServiceIntegration)svc; prometheus = new PrometheusConfig(prometheusSvc); } else if (svc instanceof DatadogCanaryServiceIntegration) { DatadogCanaryServiceIntegration datadogSvc = (DatadogCanaryServiceIntegration)svc; datadog = new DatadogConfig(datadogSvc); } else if (svc instanceof AwsCanaryServiceIntegration) { AwsCanaryServiceIntegration awsSvc = (AwsCanaryServiceIntegration)svc; aws = new AwsConfig(awsSvc); s3 = new S3Config(awsSvc); } else if (svc instanceof SignalfxCanaryServiceIntegration) { SignalfxCanaryServiceIntegration signalfxSvc = (SignalfxCanaryServiceIntegration)svc; signalfx = new SignalFxConfig(signalfxSvc); } } }