service

package
v0.0.0-...-61effe2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

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

Shared Data structure stores the Token Bucket particulars.

type Params

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

type Service

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

func NewLimiterService

func NewLimiterService(engine string, logger *slog.Logger) *Service

func (*Service) Limit

func (s *Service) Limit(ctx context.Context, key string, capacity int64, interval int32, unit string) (string, error)

func (*Service) Shutdown

func (s *Service) Shutdown()

Jump to

Keyboard shortcuts

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