Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparable ¶
type Comparable interface {
ComparisonValue() int64
}
type InMemoryCache ¶
type InMemoryCache[T any] struct { // contains filtered or unexported fields }
func (*InMemoryCache[T]) Add ¶
func (c *InMemoryCache[T]) Add(key string, data T, ttl ...time.Duration)
func (*InMemoryCache[T]) Get ¶
func (c *InMemoryCache[T]) Get(key string) (T, bool)
type SortedSlice ¶
type SortedSlice[T Comparable] struct { sync.RWMutex // contains filtered or unexported fields }
func (*SortedSlice[T]) Add ¶
func (s *SortedSlice[T]) Add(val T)
func (*SortedSlice[T]) Check ¶
func (s *SortedSlice[T]) Check() bool
func (*SortedSlice[T]) Get ¶
func (s *SortedSlice[T]) Get(i int) *T
func (*SortedSlice[T]) Len ¶
func (s *SortedSlice[T]) Len() int
func (*SortedSlice[T]) Remove ¶
func (s *SortedSlice[T]) Remove(val T)
func (*SortedSlice[T]) RemoveByIndex ¶
func (s *SortedSlice[T]) RemoveByIndex(i int)
func (*SortedSlice[T]) Sort ¶
func (s *SortedSlice[T]) Sort()
type SyncMap ¶
type SyncMap[T comparable, D any] struct { // contains filtered or unexported fields }
func NewSyncMap ¶
func NewSyncMap[T comparable, D any]() SyncMap[T, D]
Click to show internal directories.
Click to hide internal directories.