remove eventID

This commit is contained in:
Ryan McKinley 2024-07-02 14:08:42 -07:00
parent 8c1f60aa8b
commit a3d9f8aab2

View File

@ -0,0 +1,16 @@
package resource
import "sync/atomic"
// The kubernetes storage.Interface tests expect this to be a sequential progression
// SnowflakeIDs do not pass the off-the-shelf k8s tests, although they provide totally
// acceptable values.
type NextResourceVersion = func() int64
func newResourceVersionCounter(start int64) NextResourceVersion {
var counter atomic.Int64
_ = counter.Swap(start + 1)
return func() int64 {
return counter.Add(1)
}
}