aggregate

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregate

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

func New

func New(cfg Config) (*Aggregate, error)

func (*Aggregate) Add

func (m *Aggregate) Add(key string, data []byte) bool

func (*Aggregate) Count

func (m *Aggregate) Count(key string) int

func (*Aggregate) Get

func (m *Aggregate) Get(key string) [][]byte

func (*Aggregate) GetAll

func (m *Aggregate) GetAll() map[string]*aggregate

func (*Aggregate) Reset

func (m *Aggregate) Reset(key string)

func (*Aggregate) ResetAll

func (m *Aggregate) ResetAll()

type Config

type Config struct {
	Count    int    `json:"count"`
	Size     int    `json:"size"`
	Duration string `json:"duration"`
}

Jump to

Keyboard shortcuts

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