Skip to content

Commit

Permalink
updated commons
Browse files Browse the repository at this point in the history
  • Loading branch information
sanzmauro committed Dec 2, 2024
1 parent 1433b8f commit 6666e74
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
6 changes: 3 additions & 3 deletions splitio/proxy/conf/sections.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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
Expand All @@ -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
}

Expand Down Expand Up @@ -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"`
}

Expand Down

0 comments on commit 6666e74

Please sign in to comment.