weblimit

package
v2026.1201.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 9 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

Index

Constants

This section is empty.

Variables

View Source
var UnknownReset = time.Date(9999, 1, 1, 0, 0, 0, 0, time.UTC)

Functions

func HTTPError

func HTTPError(retryAfter string) error

func IsSuspended

func IsSuspended(err error) bool

func Reset

func Reset(err error, now time.Time) (time.Time, bool)

Types

type BrowserLimits

type BrowserLimits struct {
	Store BrowserStore
	// contains filtered or unexported fields
}

func (*BrowserLimits) Check

func (l *BrowserLimits) Check(ctx context.Context, origin string) error

func (*BrowserLimits) Record

func (l *BrowserLimits) Record(ctx context.Context, origin, retryAfter string) error

type BrowserStore

type BrowserStore interface {
	CheckBrowserRateLimit(context.Context, string) error
	RecordBrowserRateLimit(context.Context, string, time.Time)
}

type MCPAvailability

type MCPAvailability interface {
	CheckInternalRateLimit(context.Context, string) error
}

type Recorded

type Recorded struct {
	Err error
}

func (*Recorded) Error

func (e *Recorded) Error() string

func (*Recorded) Unwrap

func (e *Recorded) Unwrap() error

type Suspended

type Suspended struct {
	Until time.Time
}

func (*Suspended) Error

func (e *Suspended) Error() string

Jump to

Keyboard shortcuts

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