Skip to content

Commit

Permalink
adding scylla config for nova adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
YifengW86 committed Sep 26, 2024
1 parent 9f7f1da commit 368b2af
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions config/bidderinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ type BidderInfo struct {

// For MSP Plugin extension only.
MspSoPath string `mapstructure:"so_path,omitempty" json:"so_path,omitempty"`

// For Nova Adapter only
NovaScylla AdapterNovaScylla `yaml:"scylla" mapstructure:"scylla"`
}

// BidderInfoExperiment specifies non-production ready feature config for a bidder
Expand Down Expand Up @@ -182,6 +185,12 @@ type SyncerEndpoint struct {
UserMacro string `yaml:"userMacro" mapstructure:"user_macro"`
}

// AdapterNovaScylla specifies the the scylla cluster and keyspace used by Nova Adapter for time window deduplication.
type AdapterNovaScylla struct {
Cluster string `yaml:"cluster" mapstructure:"cluster"`
KeySpace string `yaml:"keyspace" mapstructure:"keyspace"`
}

func (bi BidderInfo) IsEnabled() bool {
return !bi.Disabled
}
Expand Down Expand Up @@ -439,6 +448,12 @@ func applyBidderInfoConfigOverrides(configBidderInfos BidderInfos, fsBidderInfos
if bidderInfo.EndpointCompression == "" && fsBidderCfg.EndpointCompression != "" {
bidderInfo.EndpointCompression = fsBidderCfg.EndpointCompression
}
if bidderInfo.NovaScylla.Cluster == "" && fsBidderCfg.NovaScylla.Cluster != "" {
bidderInfo.NovaScylla.Cluster = fsBidderCfg.NovaScylla.Cluster
}
if bidderInfo.NovaScylla.KeySpace == "" && fsBidderCfg.NovaScylla.KeySpace != "" {
bidderInfo.NovaScylla.KeySpace = fsBidderCfg.NovaScylla.KeySpace
}

// validate and try to apply the legacy usersync_url configuration in attempt to provide
// an easier upgrade path. be warned, this will break if the bidder adds a second syncer
Expand Down

0 comments on commit 368b2af

Please sign in to comment.