reserver

package
v2.0.0-...-3e3fc98 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reserver

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

Reserver is a JobHandler. It mark those bk jobs as reserved and then pass them to the next handler.

In the future, we may: - use reserver as an actor to centralize posting reservation updates. - use reserver as a periodic worker to keep reserveration expiration up-to-date.

func New

func New(logger *zap.Logger, agentClient *api.AgentClient, nextHandler model.ManyJobHandler, enabled bool) *Reserver

func (*Reserver) HandleMany

func (r *Reserver) HandleMany(ctx context.Context, jobs []*api.AgentScheduledJob) error

Rerserve a bunch of jobs and relay the successful reserved jobs to the next handler.

func (*Reserver) Pause

func (r *Reserver) Pause(pause bool)

Pause pauses (or un-pauses) the queue.

Jump to

Keyboard shortcuts

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