queuesvc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MPL-2.0-no-copyleft-exception Imports: 23 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeQueueServer

func MakeQueueServer() (*handler.H, chan struct{}, error)

MakeQueueServer makes an instance of the queuesvc on port 6001. It returns a chan which can be closed to terminate it, and any boot-time errors.

Types

type QueueServer

type QueueServer struct {
	H *handler.H
}

QueueServer encapsulates a GRPC server for the queuesvc.

func (*QueueServer) GetCancel

func (qs *QueueServer) GetCancel(ctx context.Context, id *gtypes.IntID) (*gtypes.Status, error)

GetCancel mirrors the GetCancel in datasvc -- just easier to access by runners.

func (*QueueServer) NextQueueItem

func (qs *QueueServer) NextQueueItem(ctx context.Context, qr *gtypes.QueueRequest) (*gtypes.QueueItem, error)

NextQueueItem gathers the next available item from the queue, if any, and returns it. If there is any failure, the queue could not be read and there is a need to retry after a wait.

func (*QueueServer) PutStatus

func (qs *QueueServer) PutStatus(ctx context.Context, s *gtypes.Status) (*empty.Empty, error)

PutStatus pushes the finished run's status out to github and back into the datasvc.

func (*QueueServer) SetCancel

func (qs *QueueServer) SetCancel(ctx context.Context, id *gtypes.IntID) (*empty.Empty, error)

SetCancel mirrors the cancel in datasvc -- just easier to access by runners.

func (*QueueServer) Submit

func (qs *QueueServer) Submit(ctx context.Context, sub *queue.Submission) (*empty.Empty, error)

Submit is the submission endpoint for the queue; all items gathered from the submission are automatically injected into the queue.

Jump to

Keyboard shortcuts

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