memory

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 3 Imported by: 10

Documentation

Overview

Package memory provides a leaky bucket implementation backed by an in-memory data store.

Usage: TODO

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage is a non thread-safe in-memory leaky bucket factory.

func New

func New() *Storage

New initializes the in-memory bucket store.

func (*Storage) Create

func (s *Storage) Create(name string, capacity uint, rate time.Duration) (leakybucket.Bucket, error)

Create a bucket.

Jump to

Keyboard shortcuts

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