storage

package
v0.0.0-...-6554e27 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_KEY  = "max_key"
	MAX_HITS = "max_hits"
)

Variables

This section is empty.

Functions

func NewInmemory

func NewInmemory() *inmemory

func NewPersistant

func NewPersistant(host, port string) (*persistent, error)

Types

type Storage

type Storage interface {
	Increment(key string) error
	Max() (string, int, error)
	Reset() error
}

Interface which all storage type must implement while http.Handler use this interface to be operational

Jump to

Keyboard shortcuts

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