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 ¶
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. |