cache

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound = errors.New("key not found or expired")

Functions

func BloomCacheKeyCheck added in v0.0.6

func BloomCacheKeyCheck(key string) bool

func BloomFilterAdd added in v0.0.6

func BloomFilterAdd(key string)

func InitBoomFilter added in v0.0.6

func InitBoomFilter(n uint, fp float64)

InitBoomFilter 初始化布隆过滤器

func IsErrKeyNotFound added in v0.0.6

func IsErrKeyNotFound(err error) bool

func Marshal added in v0.0.6

func Marshal(data any) ([]byte, error)

func SetTranscoderFunc added in v0.0.6

func SetTranscoderFunc(marshaller Marshaller, unMarshaller UnMarshaller)

func UnMarshal added in v0.0.6

func UnMarshal(data []byte, receiver any) error

Types

type Marshaller added in v0.0.6

type Marshaller func(any) ([]byte, error)

type UnMarshaller added in v0.0.6

type UnMarshaller func([]byte, any) error

Directories

Path Synopsis
providers

Jump to

Keyboard shortcuts

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