adapter

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CEOptions

type CEOptions struct {
	// Name of Engine adapter. Default is "CERedis (redis)".
	Engine CEType
	// Options denpent on Engine (gomacaron options, redis options)
	Options interface{}
}

CEOptions represent Cacher Engine Options

type CEType

type CEType string

CEType Cacher Engine Type

const (
	// CERedis Redis Cacher Engine
	CERedis CEType = "redis"
	// CEGoMacaron GoMacaron Cacher Engine
	CEGoMacaron CEType = "gomacaron"
)

type ICacherEngine

type ICacherEngine interface {
	GetEngine() interface{}
	IsExist(key string) bool
	Put(key string, val interface{}, timeout int64) error
	Get(key string) interface{}
	Incr(key string) error
	Decr(key string) error
	Delete(key string) error
	Flush() error
}

ICacherEngine contract/interface for CacherEngine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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