util

package
v0.0.0-...-f3d3b89 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DaysOfWeek = map[string]time.Weekday{
	"Monday":    time.Monday,
	"Tuesday":   time.Tuesday,
	"Wednesday": time.Wednesday,
	"Thursday":  time.Thursday,
	"Friday":    time.Friday,
	"Saturday":  time.Saturday,
	"Sunday":    time.Sunday,
}

Functions

This section is empty.

Types

type CronTrigger

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

func MustCronTrigger

func MustCronTrigger(expr string) (ct *CronTrigger)

func NewCronTrigger

func NewCronTrigger(expr string) (ct *CronTrigger, err error)

func (*CronTrigger) Description

func (ct *CronTrigger) Description() string

Description returns the description of the trigger.

func (*CronTrigger) Expression

func (ct *CronTrigger) Expression() string

Description returns the description of the trigger.

func (*CronTrigger) NextFireTime

func (ct *CronTrigger) NextFireTime(prev int64) (int64, error)

NextFireTime returns the next time at which the CronTrigger is scheduled to fire.

func (*CronTrigger) Source

func (ct *CronTrigger) Source() *quartz.CronTrigger

Description returns the description of the trigger.

type RLHTTPClient

type RLHTTPClient struct {
	Ratelimiter *rate.Limiter
	// contains filtered or unexported fields
}

RLHTTPClient Rate Limited HTTP Client

func NewClient

func NewClient(client *http.Client, rl *rate.Limiter) RLHTTPClient

func (*RLHTTPClient) Do

func (c *RLHTTPClient) Do(req *http.Request) (*http.Response, error)

Do dispatches the HTTP request to the network

Jump to

Keyboard shortcuts

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