Skip to content

Commit

Permalink
Add a new Sizeable interface in cache
Browse files Browse the repository at this point in the history
  • Loading branch information
timl3136 committed Feb 19, 2025
1 parent e36c818 commit 08a646d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,9 @@ type DomainMetricsScopeCache interface {

common.Daemon
}

// Sizeable is a interface that implements Size() function
type Sizeable interface {
// Size returns an approximate size of the object in bytes, or error if the size could not be calculated
Size() (uint64, error)
}
39 changes: 39 additions & 0 deletions common/cache/interface_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08a646d

Please sign in to comment.