cloudns

package
v4.36.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuditRecords

func AuditRecords(records []*models.RecordConfig) []error

AuditRecords returns a list of errors corresponding to the records that aren't supported by this provider. If all records are supported, an empty list is returned.

Types

type AdaptiveLimiter

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

AdaptiveLimiter is a rate limiter.

func NewAdaptiveLimiter

func NewAdaptiveLimiter(r rate.Limit, burst int) *AdaptiveLimiter

NewAdaptiveLimiter creates a new AdaptiveLimiter.

func (*AdaptiveLimiter) NotifyRateLimited

func (al *AdaptiveLimiter) NotifyRateLimited()

NotifyRateLimited reserves enough tokens to pause for a period of time.

func (*AdaptiveLimiter) Wait

func (al *AdaptiveLimiter) Wait(ctx context.Context) error

Wait blocks until a token becomes available.

Jump to

Keyboard shortcuts

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