dispatch

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dispatch is the seam between the check manager and the runners: how an open check request reaches a runner.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRunner = errors.New("check: no runner for the repository")

ErrNoRunner means that no runner of this kind serves the repository of the request.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher interface {
	Dispatch(ctx context.Context, req runnerproto.Request) error
}

Dispatcher gets an open request to a runner of its repository. A push implementation posts it to the runner. A pull implementation queues it until a runner leases it. Dispatch returns nil when a runner of req.Repo will receive req, and an error when it cannot say so; the manager repeats the call with a backoff. The manager stores the request as open before the call. Delivery is at least once with the same request_id, so a runner may see a request again and runs it once. A request for a repository with no runner of this kind is an ErrNoRunner.

Directories

Path Synopsis
Package dispatchtest is the conformance suite of dispatch.Dispatcher.
Package dispatchtest is the conformance suite of dispatch.Dispatcher.
Package memdispatch is the in-memory implementation of dispatch.Dispatcher for tests.
Package memdispatch is the in-memory implementation of dispatch.Dispatcher for tests.
Package pull dispatches a check request through a queue that runners poll.
Package pull dispatches a check request through a queue that runners poll.
Package push dispatches a check request by posting it to the hook URL of the runner of its repository.
Package push dispatches a check request by posting it to the hook URL of the runner of its repository.

Jump to

Keyboard shortcuts

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