limits

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

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(_, instName string, _, _ []string) (module.Module, error)

Types

type Group

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

func (*Group) Init

func (g *Group) Init(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