diff --git a/go.mod b/go.mod index c0a72941..e06573fc 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/gin-gonic/gin v1.10.0 github.com/google/uuid v1.3.0 github.com/splitio/gincache v1.0.1 - github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e + github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc github.com/splitio/go-toolkit/v5 v5.4.0 github.com/stretchr/testify v1.9.0 go.etcd.io/bbolt v1.3.6 diff --git a/go.sum b/go.sum index 6e2cdcd1..6c92d9ce 100644 --- a/go.sum +++ b/go.sum @@ -95,6 +95,8 @@ github.com/splitio/gincache v1.0.1 h1:dLYdANY/BqH4KcUMCe/LluLyV5WtuE/LEdQWRE06IX github.com/splitio/gincache v1.0.1/go.mod h1:CcgJDSM9Af75kyBH0724v55URVwMBuSj5x1eCWIOECY= github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e h1:d/bRCPlzszazKemFu7UOyzJJHc+Ren43u178vd1Do5c= github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= +github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc h1:pud1qA/GUJxe2VS2E23wg2BjZ/5q7hSKto+wUt5ZNFA= +github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= github.com/splitio/go-toolkit/v5 v5.4.0 h1:g5WFpRhQomnXCmvfsNOWV4s5AuUrWIZ+amM68G8NBKM= github.com/splitio/go-toolkit/v5 v5.4.0/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/splitio/proxy/conf/sections.go b/splitio/proxy/conf/sections.go index 61785d15..5ffb8b8d 100644 --- a/splitio/proxy/conf/sections.go +++ b/splitio/proxy/conf/sections.go @@ -2,6 +2,7 @@ package conf import ( cconf "github.com/splitio/go-split-commons/v6/conf" + "github.com/splitio/go-split-commons/v6/service/api/specs" "github.com/splitio/split-synchronizer/v5/splitio/common/conf" ) @@ -21,7 +22,6 @@ type Main struct { Healthcheck Healthcheck `json:"healthcheck" s-nested:"true"` Observability Observability `json:"observability" s-nested:"true"` FlagSpecVersion string `json:"flagSpecVersion" s-cli:"flag-spec-version" s-def:"1.2" s-desc:"Spec version for flags"` - LargeSegmentVersion string `json:"largeSegmentVersion" s-cli:"largesegment-version" s-def:"1.0" s-desc:"Spec version for large segments"` } // BuildAdvancedConfig generates a commons-compatible advancedconfig with default + overriden parameters @@ -35,7 +35,7 @@ func (m *Main) BuildAdvancedConfig() *cconf.AdvancedConfig { tmp.SegmentsRefreshRate = int(m.Sync.SegmentRefreshRateMs / 1000) tmp.LargeSegment.LazyLoad = m.Sync.Advanced.LargeSegmentLazyLoad tmp.LargeSegment.RefreshRate = int(m.Sync.LargeSegmentRefreshRateMs / 1000) - tmp.LargeSegment.Version = m.LargeSegmentVersion + tmp.LargeSegment.Version = specs.LARGESEGMENT_V10 return tmp } @@ -74,7 +74,7 @@ type Persistent struct { type Sync struct { SplitRefreshRateMs int64 `json:"splitRefreshRateMs" s-cli:"split-refresh-rate-ms" s-def:"60000" s-desc:"How often to refresh feature flags"` SegmentRefreshRateMs int64 `json:"segmentRefreshRateMs" s-cli:"segment-refresh-rate-ms" s-def:"60000" s-desc:"How often to refresh segments"` - LargeSegmentRefreshRateMs int64 `json:"largeSegmentRefreshRateMs" s-cli:"largesegment-refresh-rate-ms" s-def:"3600000" s-desc:"How often to refresh large segments"` + LargeSegmentRefreshRateMs int64 `json:"largeSegmentRefreshRateMs" s-cli:"largesegment-refresh-rate-ms" s-def:"600000" s-desc:"How often to refresh large segments"` Advanced AdvancedSync `json:"advanced" s-nested:"true"` }