memory

package
v1.2.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DriverName = "memory"

Variables

This section is empty.

Functions

func NewMemoryCache

func NewMemoryCache(cfg Config) (mc cache.Cache)

func NewMemoryCounter

func NewMemoryCounter(cfg Config) (mc cache.Counter)

Types

type Config

type Config struct {
	EnableInitiativeClean bool `json:"enable_initiative_clean,omitempty" yaml:"enable_initiative_clean,omitempty" xml:"enable_initiative_clean,omitempty"`
	CleanIntervalSecond   int  `json:"clean_interval_second,omitempty" yaml:"clean_interval_second,omitempty" xml:"clean_interval_second,omitempty"`
	MaxCleanMicroSecond   int  `json:"max_clean_micro_second,omitempty" yaml:"max_clean_micro_second,omitempty" xml:"max_clean_micro_second,omitempty"`
	MaxCleanPercentage    int  `json:"max_clean_percentage,omitempty" yaml:"max_clean_percentage,omitempty" xml:"max_clean_percentage,omitempty"`
}

type ReceiverTypeIncorrectError added in v1.2.8

type ReceiverTypeIncorrectError struct {
	Type string
	Nil  bool
}

func NewReceiverTypeIncorrectError added in v1.2.8

func NewReceiverTypeIncorrectError(t string, isNil bool) ReceiverTypeIncorrectError

func (ReceiverTypeIncorrectError) Error added in v1.2.8

type Type

type Type string
const (
	Int    Type = "int"
	String Type = "string"
	Set    Type = "set"
	Hash   Type = "hash"
)

type ValueTypeNotMatchError

type ValueTypeNotMatchError struct {
	Want     Type
	Actually Type
}

func NewValueTypeNotMatchError

func NewValueTypeNotMatchError(want, actually Type) ValueTypeNotMatchError

func (ValueTypeNotMatchError) Error

func (e ValueTypeNotMatchError) Error() string

Jump to

Keyboard shortcuts

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