utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cached

type Cached[T any] struct {
	// contains filtered or unexported fields
}

func (*Cached[T]) Get

func (c *Cached[T]) Get(factory func() (T, error)) (T, error)

type Counter

type Counter struct {
	ID       int64
	Requests int64
	Last     int64 // time in ns
}

func (*Counter) Inc

func (c *Counter) Inc()

type Stats

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

func (*Stats) Inc

func (s *Stats) Inc(id int64)

func (*Stats) Pop

func (s *Stats) Pop() []*Counter

Jump to

Keyboard shortcuts

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