github.com/prebid/prebid-server/v2@v2.18.0/config/hooks.go (about) 1 package config 2 3 type Hooks struct { 4 Enabled bool `mapstructure:"enabled"` 5 Modules Modules `mapstructure:"modules"` 6 // HostExecutionPlan defined by the host company and is executed always 7 HostExecutionPlan HookExecutionPlan `mapstructure:"host_execution_plan"` 8 // DefaultAccountExecutionPlan can be replaced by the account-specific hook execution plan 9 DefaultAccountExecutionPlan HookExecutionPlan `mapstructure:"default_account_execution_plan"` 10 } 11 12 // Modules mapping provides module specific configuration, format: map[vendor_name]map[module_name]interface{} 13 // actual configuration parsing performed by modules 14 type Modules map[string]map[string]interface{} 15 16 type HookExecutionPlan struct { 17 Endpoints map[string]struct { 18 Stages map[string]struct { 19 Groups []HookExecutionGroup `mapstructure:"groups" json:"groups"` 20 } `mapstructure:"stages" json:"stages"` 21 } `mapstructure:"endpoints" json:"endpoints"` 22 } 23 24 type HookExecutionGroup struct { 25 // Timeout specified in milliseconds. 26 // Zero value marks the hook execution status with the "timeout" value. 27 Timeout int `mapstructure:"timeout" json:"timeout"` 28 HookSequence []struct { 29 // ModuleCode is a composite value in the format: {vendor_name}.{module_name} 30 ModuleCode string `mapstructure:"module_code" json:"module_code"` 31 // HookImplCode is an arbitrary value, used to identify hook when sending metrics, debug information, etc. 32 HookImplCode string `mapstructure:"hook_impl_code" json:"hook_impl_code"` 33 } `mapstructure:"hook_sequence" json:"hook_sequence"` 34 }