ratelimit

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func NewStore

func NewStore(rc *redis.Client, logger *slog.Logger) *Store

NewStore creates a Redis plan counter; nil redis is unavailable (caller fail-open).

func (*Store) IncrBurst

func (s *Store) IncrBurst(ctx context.Context, gatewayID ids.GatewayID) (int64, time.Duration, error)

func (*Store) IncrQuota

func (s *Store) IncrQuota(ctx context.Context, gatewayID ids.GatewayID, month string) (int64, error)

Jump to

Keyboard shortcuts

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