Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Add values Add op = "add" // Subtract values Subtract = "sub" // Multiply values Multiply = "mult" // Divide values Divide = "div" )
Variables ¶
This section is empty.
Functions ¶
func Processor ¶
func Processor(ctx context.Context, in chan *WorkRequest, out chan *WorkResponse)
Processor routes work to Process
Types ¶
type WorkRequest ¶
WorkRequest perform an op on two values
type WorkResponse ¶
type WorkResponse struct { Wr *WorkRequest Result int64 Err error }
WorkResponse returns the result and any errors
func Process ¶
func Process(wr *WorkRequest) *WorkResponse
Process switches on operation type Then does work
Click to show internal directories.
Click to hide internal directories.