Documentation ¶
Index ¶
- type Map
- func (m *Map[K, T]) Clean()
- func (m *Map[K, T]) Get(key K) (item mapitem.Item[T], ok bool)
- func (m *Map[K, T]) Has(key K) bool
- func (m *Map[K, T]) Items() map[K]mapitem.Item[T]
- func (m *Map[K, T]) IterBuffered() <-chan tuple[K, mapitem.Item[T]]
- func (m *Map[K, T]) Remove(key K)
- func (m *Map[K, T]) Set(key K, value T, opts ...mapitem.Option[T])
- func (m *Map[K, T]) Size() int
- type MapStringer
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K comparable, T any] struct { // contains filtered or unexported fields }
func NewStringer ¶
func NewStringer[K MapStringer, T any](opts ...Option[K, T]) *Map[K, T]
func (*Map[K, T]) IterBuffered ¶
多线程读取所有数据
type MapStringer ¶ added in v1.0.2
type MapStringer interface { comparable fmt.Stringer }
type Option ¶
type Option[K comparable, T any] func(m *Map[K, T])
func WithItemOpts ¶ added in v1.0.2
func WithItemOpts[K comparable, T any](opts ...mapitem.Option[T]) Option[K, T]
配置默认缓存策略
Click to show internal directories.
Click to hide internal directories.