Documentation ¶
Overview ¶
Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
github.com/donnie4w/tldb
Copyright (c) 2023, donnie <donnie4w@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
github.com/donnie4w/tldb
Index ¶
- type Bloomfilter
- type Consistenthash
- type FastLinkedMap
- type LimitMap
- type LinkedMap
- func (this *LinkedMap[K, V]) Back() (k K)
- func (this *LinkedMap[K, V]) BackForEach(f func(k K, v V) bool)
- func (this *LinkedMap[K, V]) Del(key K) (ok bool)
- func (this *LinkedMap[K, V]) Front() (k K)
- func (this *LinkedMap[K, V]) FrontForEach(f func(k K, v V) bool)
- func (this *LinkedMap[K, V]) Get(key K) (v V, ok bool)
- func (this *LinkedMap[K, V]) Has(key K) (ok bool)
- func (this *LinkedMap[K, V]) Len() int
- func (this *LinkedMap[K, V]) Next(key K) (k K, v V)
- func (this *LinkedMap[K, V]) Prev(key K) (k K, v V, _ok bool)
- func (this *LinkedMap[K, V]) Put(k K, v V)
- type LruCache
- type Map
- type MapL
- type SortMap
- func (this *SortMap[K, V]) BackForEach(f func(k K, v V) bool)
- func (this *SortMap[K, V]) DelAndLoadBack() (k K, v V)
- func (this *SortMap[K, V]) FrontForEach(f func(k K, v V) bool)
- func (this *SortMap[K, V]) Get(key K) (v V, ok bool)
- func (this *SortMap[K, V]) GetFrontKey() (k K, ok bool)
- func (this *SortMap[K, V]) Len() int
- func (this *SortMap[K, V]) Put(key K, value V)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bloomfilter ¶
type Bloomfilter struct {
// contains filtered or unexported fields
}
func NewBloomFilter ¶
func NewBloomFilter(limit int) *Bloomfilter
func (*Bloomfilter) Add ¶
func (this *Bloomfilter) Add(key []byte)
func (*Bloomfilter) Contains ¶
func (this *Bloomfilter) Contains(key []byte) bool
type Consistenthash ¶
type Consistenthash struct {
// contains filtered or unexported fields
}
func NewConsistenthash ¶
func NewConsistenthash(replicas int) (m *Consistenthash)
func (*Consistenthash) Add ¶
func (this *Consistenthash) Add(keys ...int64)
func (*Consistenthash) Del ¶
func (this *Consistenthash) Del(key int64)
func (*Consistenthash) Get ¶
func (this *Consistenthash) Get(value int64) (node int64)
type FastLinkedMap ¶
type FastLinkedMap[K, V any] struct { // contains filtered or unexported fields }
func NewFastLinkedMap ¶
func NewFastLinkedMap[K, V any]() *FastLinkedMap[K, V]
func (*FastLinkedMap[K, V]) Put ¶
func (this *FastLinkedMap[K, V]) Put(k K, v V)
func (*FastLinkedMap[K, V]) Range ¶
func (this *FastLinkedMap[K, V]) Range(f func(k K, v V) bool)
func (*FastLinkedMap[K, V]) RangeAndDelete ¶
func (this *FastLinkedMap[K, V]) RangeAndDelete(f func(id int64, k K, v V) bool)
type LimitMap ¶
type LimitMap[K, V any] struct { // contains filtered or unexported fields }
func NewLimitMap ¶
type LinkedMap ¶
type LinkedMap[K, V any] struct { // contains filtered or unexported fields }
**********************************************************
func NewLinkedMap ¶
func (*LinkedMap[K, V]) BackForEach ¶
func (*LinkedMap[K, V]) FrontForEach ¶
type LruCache ¶
type LruCache[T any] struct { // contains filtered or unexported fields }
func NewLruCache ¶
func (*LruCache[T]) RemoveMulti ¶
type SortMap ¶
type SortMap[K int | int64 | int8 | int32 | string, V any] struct { // contains filtered or unexported fields }
********************************************************** the big numbers come front
func (*SortMap[K, V]) BackForEach ¶
func (*SortMap[K, V]) DelAndLoadBack ¶
func (this *SortMap[K, V]) DelAndLoadBack() (k K, v V)
func (*SortMap[K, V]) FrontForEach ¶
func (*SortMap[K, V]) GetFrontKey ¶
Click to show internal directories.
Click to hide internal directories.