Documentation ¶
Overview ¶
nolint: unused
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobRequest ¶
type JobRequest struct { FuncName string // Function name. ID string // Job identifier. Data []byte // Job data payload. Background bool // Whether this is a background job. Callback JobUpdateCallback // Only used by non-background jobs. }
type JobUpdate ¶
type JobUpdate struct { Type JobUpdateType Handle string Status [2]int // Status numerator and denominator. Data []byte // Opaque data (nil if the update type does not include data). }
type JobUpdateCallback ¶
type JobUpdateCallback func(update JobUpdate)
type JobUpdateType ¶
type JobUpdateType int
const ( JobUpdateTypeData JobUpdateType = iota JobUpdateTypeWarning JobUpdateTypeStatus JobUpdateTypeComplete JobUpdateTypeFail JobUpdateTypeException )
func (JobUpdateType) String ¶
func (t JobUpdateType) String() string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServerWithAddr ¶
func (*Server) Submit ¶
func (s *Server) Submit(r *JobRequest) string
Submit a job and receive its handle.
Directories ¶
Path | Synopsis |
---|---|
Package gearmintest provides utilities for testing code that uses gearmin.
|
Package gearmintest provides utilities for testing code that uses gearmin. |
Click to show internal directories.
Click to hide internal directories.