Skip to content

Commit

Permalink
Add poller config to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Jan 16, 2025
1 parent 7ee85ed commit c920104
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
17 changes: 9 additions & 8 deletions plugins/turing/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ type TreatmentServicePluginConfig struct {
Port int `json:"port" default:"8080"`
PubSubTimeoutSeconds int `json:"pub_sub_timeout_seconds" validate:"required"`

AssignedTreatmentLogger config.AssignedTreatmentLoggerConfig `json:"assigned_treatment_logger"`
DebugConfig config.DebugConfig `json:"debug_config"`
DeploymentConfig config.DeploymentConfig `json:"deployment_config"`
ManagementService config.ManagementServiceConfig `json:"management_service"`
MonitoringConfig config.Monitoring `json:"monitoring_config"`
SwaggerConfig config.SwaggerConfig `json:"swagger_config"`
NewRelicConfig newrelic.Config `json:"new_relic_config"`
SentryConfig sentry.Config `json:"sentry_config"`
AssignedTreatmentLogger config.AssignedTreatmentLoggerConfig `json:"assigned_treatment_logger"`
DebugConfig config.DebugConfig `json:"debug_config"`
DeploymentConfig config.DeploymentConfig `json:"deployment_config"`
ManagementService config.ManagementServiceConfig `json:"management_service"`
MonitoringConfig config.Monitoring `json:"monitoring_config"`
SwaggerConfig config.SwaggerConfig `json:"swagger_config"`
NewRelicConfig newrelic.Config `json:"new_relic_config"`
SentryConfig sentry.Config `json:"sentry_config"`
ManagementServicePollerConfig config.ManagementServicePollerConfig `json:"management_service_poller_config"`
}

type Variable struct {
Expand Down
23 changes: 12 additions & 11 deletions plugins/turing/manager/experiment_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,18 @@ func (em *experimentManager) MakeTreatmentServicePluginConfig(
projectID int,
) (*config.Config, error) {
pluginConfig := &config.Config{
Port: em.TreatmentServicePluginConfig.Port,
ProjectIds: []string{strconv.Itoa(projectID)},
AssignedTreatmentLogger: em.TreatmentServicePluginConfig.AssignedTreatmentLogger,
DebugConfig: em.TreatmentServicePluginConfig.DebugConfig,
DeploymentConfig: em.TreatmentServicePluginConfig.DeploymentConfig,
ManagementService: em.TreatmentServicePluginConfig.ManagementService,
MonitoringConfig: em.TreatmentServicePluginConfig.MonitoringConfig,
SwaggerConfig: em.TreatmentServicePluginConfig.SwaggerConfig,
NewRelicConfig: em.TreatmentServicePluginConfig.NewRelicConfig,
SentryConfig: em.TreatmentServicePluginConfig.SentryConfig,
SegmenterConfig: *treatmentServiceConfig.SegmenterConfig,
Port: em.TreatmentServicePluginConfig.Port,
ProjectIds: []string{strconv.Itoa(projectID)},
AssignedTreatmentLogger: em.TreatmentServicePluginConfig.AssignedTreatmentLogger,
DebugConfig: em.TreatmentServicePluginConfig.DebugConfig,
DeploymentConfig: em.TreatmentServicePluginConfig.DeploymentConfig,
ManagementService: em.TreatmentServicePluginConfig.ManagementService,
MonitoringConfig: em.TreatmentServicePluginConfig.MonitoringConfig,
SwaggerConfig: em.TreatmentServicePluginConfig.SwaggerConfig,
NewRelicConfig: em.TreatmentServicePluginConfig.NewRelicConfig,
SentryConfig: em.TreatmentServicePluginConfig.SentryConfig,
SegmenterConfig: *treatmentServiceConfig.SegmenterConfig,
ManagementServicePollerConfig: em.TreatmentServicePluginConfig.ManagementServicePollerConfig,
}
messageQueueKind := *treatmentServiceConfig.MessageQueueConfig.Kind
switch messageQueueKind {
Expand Down

0 comments on commit c920104

Please sign in to comment.