tokenbucket

package
v0.0.0-...-5861b17 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tokenbucket registers a job that is used to fetch a token from a token bucket.

Register name: "tokenBucket" Args:

"bucket"(mandatory): The name of the bucket
"fatal"(mandatory): true if a failure should cause a fatal error, false if it should block until it gets one

Result:

If the site is not in decom, will return a fatal error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

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

Job implements jobs.Job.

func (*Job) Run

func (j *Job) Run(ctx context.Context, job *pb.Job) error

Run implements jobs.Job.Run().

func (*Job) Validate

func (j *Job) Validate(job *pb.Job) error

Validate implements jobs.Job.Validate().

Jump to

Keyboard shortcuts

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