Documentation ¶
Index ¶
- func NewLastUsage(opts ...lastUsageOption) *lastUsage
- func OnceFunc(f func(ctx context.Context) error) func(ctx context.Context) error
- func WithClock(clock clockwork.Clock) lastUsageOption
- func WithLock[T any](l mutex, f func() T) T
- func WithRLock[T any](l rwMutex, f func() T) T
- type EventBroadcast
- type LastUsage
- type Map
- func (m *Map[K, V]) Clear() (removed int)
- func (m *Map[K, V]) Delete(key K) bool
- func (m *Map[K, V]) Extract(key K) (value V, ok bool)
- func (m *Map[K, V]) Get(key K) (value V, ok bool)
- func (m *Map[K, V]) Has(key K) bool
- func (m *Map[K, V]) Len() int
- func (m *Map[K, V]) Must(key K) (value V)
- func (m *Map[K, V]) Range(f func(key K, value V) bool)
- func (m *Map[K, V]) Set(key K, value V)
- type Mutex
- type Once
- type OneTimeWaiter
- type Pool
- type RWMutex
- type Set
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLastUsage ¶ added in v3.65.0
func NewLastUsage(opts ...lastUsageOption) *lastUsage
Types ¶
type EventBroadcast ¶ added in v3.38.0
type EventBroadcast struct {
// contains filtered or unexported fields
}
EventBroadcast is implementation of broadcast notify about event Zero value is usable, must not copy after first call any method
func (*EventBroadcast) Broadcast ¶ added in v3.38.0
func (b *EventBroadcast) Broadcast()
func (*EventBroadcast) Waiter ¶ added in v3.38.0
func (b *EventBroadcast) Waiter() OneTimeWaiter
Waiter return channel, that will close when next event will be broadcast. For prevent race between subscribe and event client code must subscribe at first, then check condition if false - wait closing channed and check condition again
type Map ¶ added in v3.75.1
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
type OneTimeWaiter ¶ added in v3.38.0
type OneTimeWaiter struct {
// contains filtered or unexported fields
}
func (*OneTimeWaiter) Done ¶ added in v3.38.0
func (w *OneTimeWaiter) Done() <-chan struct{}
type Pool ¶ added in v3.75.0
type Pool[T any] struct { New func() *T // contains filtered or unexported fields }
type Set ¶ added in v3.76.0
type Set[T comparable] struct { // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.