ins

package module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

ins : a k/v storage package in golang

feature:

  1. hash
  2. lazy delete

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ins

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

func New

func New() *Ins

func (*Ins) Del

func (i *Ins) Del(key string) error

func (*Ins) Expire added in v0.1.6

func (i *Ins) Expire(key string, exp int64) error

func (*Ins) Get

func (i *Ins) Get(key string) (interface{}, bool)

return nil,false if key not found

func (*Ins) Set

func (i *Ins) Set(key string, value interface{}) error

set key value

func (*Ins) SetEx

func (i *Ins) SetEx(key string, val interface{}, exp int64) error

func (*Ins) SetNx

func (i *Ins) SetNx(key string, val interface{}) error

func (*Ins) SetNxEx

func (i *Ins) SetNxEx(key string, val interface{}, exp int64) error

Jump to

Keyboard shortcuts

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