zcache

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

*

  • @Author : nopsky
  • @Email : cnnopsky@gmail.com
  • @Date : 2021/9/14 19:31

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICache

type ICache interface {
	Set(ctx context.Context, key string, value interface{}, expire time.Duration) error
	Get(ctx context.Context, key string) (string, error)
	SAdd(ctx context.Context, key string, value []interface{}, expire time.Duration) error
	SMembers(ctx context.Context, key string) ([]string, error)
	Exists(ctx context.Context, key string) bool
	ZAdd(ctx context.Context, key string, score float64, value interface{}) error
	ZIncr(ctx context.Context, key string, score float64, member string, expire time.Duration) error
	ZRank(ctx context.Context, key string, member string) int64
	ZScore(ctx context.Context, key string, member string) float64
	ZRevRange(ctx context.Context, key string, start int64, end int64) []map[string]float64
}

func NewCache

func NewCache() ICache

type Options

type Options struct {
	Driver string
	Type   string
}

Directories

Path Synopsis
*
*

Jump to

Keyboard shortcuts

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