Skip to content

Commit

Permalink
Move constant
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
  • Loading branch information
colega committed Dec 4, 2024
1 parent 5a769aa commit a33a621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pkg/usagetracker/tracker_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import (
"go.uber.org/atomic"
)

const snapshotEncodingVersion = 1

const shards = 128

// trackerStore holds the core business logic of the usage-tracker abstracted in a testable way.
Expand Down
2 changes: 2 additions & 0 deletions pkg/usagetracker/tracker_store_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"go.uber.org/atomic"
)

const snapshotEncodingVersion = 1

func (t *trackerStore) snapshot(shard uint8, now time.Time, buf []byte) []byte {
t.lock[shard].RLock()
shardTenants := maps.Clone(t.data[shard])
Expand Down

0 comments on commit a33a621

Please sign in to comment.