local

package
v0.0.0-...-41bdb7a Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	// LocalCache
	Check(value []byte) bool
	Add(value []byte) bool
}

type LocalBloomFilters

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

func NewLocalBloomFilters

func NewLocalBloomFilters(filters map[string]*gobloom.GoBloomChain, buildOptions gobloom.BloomBuildOptions) *LocalBloomFilters

func (*LocalBloomFilters) AddFilter

func (lbf *LocalBloomFilters) AddFilter(key string, filter Filter) bool

func (*LocalBloomFilters) Get

func (lbf *LocalBloomFilters) Get(ctx context.Context, key interface{}, args ...interface{}) ([]interface{}, error)

func (*LocalBloomFilters) Load

func (lbf *LocalBloomFilters) Load(ctx context.Context, key interface{}, args ...interface{}) error

func (*LocalBloomFilters) Set

func (lbf *LocalBloomFilters) Set(ctx context.Context, key interface{}, args ...interface{}) error

type LocalCache

type LocalCache interface {
	Get(ctx context.Context, key interface{}, args ...interface{}) ([]interface{}, error)
	Set(ctx context.Context, key interface{}, args ...interface{}) error
	Load(ctx context.Context, key interface{}, args ...interface{}) error
}

type LocalCuckooFilter

type LocalCuckooFilter interface {
	LocalFilters
	Del(ctx context.Context, key string, value []byte) error
}

type LocalCuckooFilters

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

func NewLocalCuckooFilters

func NewLocalCuckooFilters(filters map[string]*gocuckoo.GoCuckooFilterImpl, buildOptions gocuckoo.CuckooBuildOptions) *LocalCuckooFilters

DelOnLocal(ctx context.Context,key interface{},args ...interface{})error

func (*LocalCuckooFilters) AddFilter

func (lcf *LocalCuckooFilters) AddFilter(key string, filter *gocuckoo.GoCuckooFilterImpl)

func (*LocalCuckooFilters) Del

func (lcf *LocalCuckooFilters) Del(ctx context.Context, key interface{}, args ...interface{}) error

func (*LocalCuckooFilters) Get

func (lcf *LocalCuckooFilters) Get(ctx context.Context, key interface{}, args ...interface{}) ([]interface{}, error)

func (*LocalCuckooFilters) Load

func (lcf *LocalCuckooFilters) Load(ctx context.Context, key interface{}, args ...interface{}) error

func (*LocalCuckooFilters) Set

func (lcf *LocalCuckooFilters) Set(ctx context.Context, key interface{}, args ...interface{}) error

type LocalFilters

type LocalFilters interface {
	LocalCache
	Filter
	AddFilter(key string, filter Filter) error
}

type LocalKeyValueCacheImpl

type LocalKeyValueCacheImpl struct {
	*cache.LocalCacheImpl
}

func NewLocalCache

func NewLocalCache(ctx context.Context, maxEntries int) (*LocalKeyValueCacheImpl, error)

func (*LocalKeyValueCacheImpl) Del

func (lc *LocalKeyValueCacheImpl) Del(ctx context.Context, key interface{}, args ...interface{}) error

func (*LocalKeyValueCacheImpl) Get

func (lc *LocalKeyValueCacheImpl) Get(ctx context.Context, key interface{}, args ...interface{}) ([]interface{}, error)

func (*LocalKeyValueCacheImpl) Load

func (lc *LocalKeyValueCacheImpl) Load(ctx context.Context, key interface{}, args ...interface{}) error

func (*LocalKeyValueCacheImpl) Set

func (lc *LocalKeyValueCacheImpl) Set(ctx context.Context, key interface{}, args ...interface{}) error

Set key value

NOTE

Jump to

Keyboard shortcuts

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