ttlpool

package
v0.0.0-...-39fbc60 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountPool

type CountPool struct {
	// contains filtered or unexported fields
}

func NewCountPool

func NewCountPool() *CountPool

func (*CountPool) Add

func (p *CountPool) Add(obj interface{}, count uint64) error

func (*CountPool) Delete

func (p *CountPool) Delete(obj interface{}) (err error)

func (*CountPool) DeleteByKey

func (p *CountPool) DeleteByKey(key string) (err error)

func (*CountPool) Get

func (p *CountPool) Get(obj interface{}) (interface{}, bool, error)

func (*CountPool) GetByKey

func (p *CountPool) GetByKey(key string) (interface{}, bool, error)

func (*CountPool) GetCount

func (p *CountPool) GetCount(obj interface{}) (count uint64, ok bool, err error)

func (*CountPool) GetCountByKey

func (p *CountPool) GetCountByKey(key string) (count uint64, ok bool)

func (*CountPool) Has

func (p *CountPool) Has(obj interface{}) (bool, error)

func (*CountPool) HasByKey

func (p *CountPool) HasByKey(key string) (bool, error)

type Item

type Item interface {
	Index() (string, error)
}

type TTLPool

type TTLPool struct {
	// contains filtered or unexported fields
}

func NewTTLPool

func NewTTLPool(defaultTTL time.Duration) *TTLPool

func (*TTLPool) Add

func (p *TTLPool) Add(obj interface{}) error

func (*TTLPool) Delete

func (p *TTLPool) Delete(obj interface{}) error

func (*TTLPool) DeleteByKey

func (p *TTLPool) DeleteByKey(key string) error

func (*TTLPool) Get

func (p *TTLPool) Get(obj interface{}) (interface{}, bool, error)

func (*TTLPool) GetByKey

func (p *TTLPool) GetByKey(key string) (interface{}, bool, error)

func (*TTLPool) Has

func (p *TTLPool) Has(obj interface{}) (bool, error)

func (*TTLPool) HasByKey

func (p *TTLPool) HasByKey(key string) (bool, error)

func (*TTLPool) List

func (p *TTLPool) List() []interface{}

Jump to

Keyboard shortcuts

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