internal

package
v0.0.0-...-1201bab Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const HeapAllocDebugging = false
View Source
const (
	LevelTrace slog.Level = slog.LevelDebug - 2
)

Variables

This section is empty.

Functions

func LogAttrs

func LogAttrs(l *slog.Logger, level slog.Level, msg string, attrs ...slog.Attr)

LogAttrs is a helper function that is used by all package loggers and that can be switched out with the `debugheaplog` build tag for a non-allocating logger that prints out when heap allocations occur.

Types

type Backoff

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

A Backoff with a non-zero MaxWait is ready for use.

func NewBackoff

func NewBackoff(priority BackoffFlags) Backoff

func (*Backoff) Hit

func (eb *Backoff) Hit()

Hit sets eb.Wait to the StartWait value.

func (*Backoff) Miss

func (eb *Backoff) Miss()

Miss sleeps for eb.Wait and increases eb.Wait exponentially.

type BackoffFlags

type BackoffFlags uint8
const (
	BackoffHasPriority BackoffFlags = 1 << iota
	BackoffCriticalPath
)

Jump to

Keyboard shortcuts

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