Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WorkGenerate ¶
func WorkGenerate(item *serializableModels.ClientRequest) (string, error)
func WorkToString ¶
Types ¶
type WorkProcessor ¶
type WorkProcessor struct { Queue *models.RandomAccessQueue // WorkQueueChan is where we write requests from the websocket WorkQueueChan chan *serializableModels.ClientRequest // WorkProcessChan is where we actually read from the queue and compute work WorkProcessChan chan bool WSService *websocket.WebsocketService }
func NewWorkProcessor ¶
func NewWorkProcessor(ws *websocket.WebsocketService, nWorkProcesses int) *WorkProcessor
func (*WorkProcessor) StartRequestQueueWorker ¶
func (wp *WorkProcessor) StartRequestQueueWorker()
RequestQueueWorker - is a worker that receives work requests directly from the websocket, adds them to the queue, and determines what should be worked on next
func (*WorkProcessor) StartWorkProcessor ¶
func (wp *WorkProcessor) StartWorkProcessor()
WorkProcessor - is a worker that actually generates work and sends the result back over the websocket
Click to show internal directories.
Click to hide internal directories.