worker

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessRequests added in v0.0.28

func ProcessRequests(ctx context.Context)

func Submit added in v0.0.28

func Submit(ctx context.Context, r *entry.Request)

Types

type Daily added in v0.0.31

type Daily struct{}

Daily schedules the job to run at midnight

type Every added in v0.0.31

type Every time.Duration

type Job added in v0.0.31

type Job interface {
	Run(context.Context)
}

type JobFunc added in v0.0.31

type JobFunc func(context.Context)

func (JobFunc) Run added in v0.0.31

func (f JobFunc) Run(ctx context.Context)

type JobScheduler added in v0.0.31

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

func GetScheduler added in v0.0.31

func GetScheduler(ctx context.Context) *JobScheduler

func OpenScheduler added in v0.0.31

func OpenScheduler(ctx context.Context) (context.Context, *JobScheduler)

func (*JobScheduler) Close added in v0.0.31

func (j *JobScheduler) Close() error

func (*JobScheduler) Schedule added in v0.0.31

func (s *JobScheduler) Schedule(id string, schedule Schedule, job Job)

type RequestBuffer added in v0.0.28

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

func GetBuff added in v0.0.28

func GetBuff(ctx context.Context) *RequestBuffer

func SetupRequestsBuffer added in v0.0.28

func SetupRequestsBuffer(ctx context.Context) (context.Context, *RequestBuffer)

func (*RequestBuffer) Accept added in v0.0.28

func (r *RequestBuffer) Accept(req *entry.Request)

func (*RequestBuffer) Close added in v0.0.28

func (r *RequestBuffer) Close() error

type Schedule added in v0.0.31

type Schedule interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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