limits

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: GPL-3.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package limit provides a module object that can be used to restrict the concurrency and rate of the messages flow globally or on per-source, per-destination basis.

Note, all domain inputs are interpreted with the assumption they are already normalized.

Low-level components are available in the limiters/ subpackage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *container.C, _, instName string) (module.Module, error)

Types

type Group

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

func Empty added in v0.9.5

func Empty(log *log.Logger) *Group

func (*Group) Configure added in v0.9.0

func (g *Group) Configure(inlineArgs []string, cfg *config.Map) error

func (*Group) InstanceName

func (g *Group) InstanceName() string

func (*Group) Name

func (g *Group) Name() string

func (*Group) ReleaseDest

func (g *Group) ReleaseDest(domain string)

func (*Group) ReleaseMsg

func (g *Group) ReleaseMsg(addr net.IP, sourceDomain string)

func (*Group) TakeDest

func (g *Group) TakeDest(ctx context.Context, domain string) error

func (*Group) TakeMsg

func (g *Group) TakeMsg(ctx context.Context, addr net.IP, sourceDomain string) error

Directories

Path Synopsis
Package limiters provides a set of wrappers intended to restrict the amount of resources consumed by the server.
Package limiters provides a set of wrappers intended to restrict the amount of resources consumed by the server.

Jump to

Keyboard shortcuts

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