slowset

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectData

type ObjectData struct {
	Timestamp       time.Time
	StorageClassUID string
}

type SlowSet

type SlowSet struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

SlowSet is a set of API objects that should be synced at slower rate. Key is typically the object namespace + name and value is timestamp when the object was added to the set.

func NewSlowSet

func NewSlowSet(retTime time.Duration) *SlowSet

func (*SlowSet) Add

func (s *SlowSet) Add(key string, info ObjectData) bool

func (*SlowSet) Contains

func (s *SlowSet) Contains(key string) bool

func (*SlowSet) Get

func (s *SlowSet) Get(key string) (ObjectData, bool)

func (*SlowSet) Remove

func (s *SlowSet) Remove(key string)

func (*SlowSet) Run

func (s *SlowSet) Run(stopCh <-chan struct{})

func (*SlowSet) TimeRemaining

func (s *SlowSet) TimeRemaining(key string) time.Duration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL