store

package
v0.0.0-...-2554cd7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryStore

type InMemoryStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*InMemoryStore) Available

func (s *InMemoryStore) Available(key string) int

func (*InMemoryStore) Increment

func (s *InMemoryStore) Increment(key string) (int, error)

func (*InMemoryStore) Stats

func (s *InMemoryStore) Stats() map[string]int

type Store

type Store interface {
	Increment(string) (int, error)
	Stats() map[string]int
}

func NewStore

func NewStore(limit int) Store

Jump to

Keyboard shortcuts

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