Instantiating and operating worker nodes

To create a new worker, the user of the package invokes the NewWorker constructor, which returns a new Worker instance. The definition of the Worker type looks as follows:

The Worker type stores the following:

  • The client gRPC connection to the master
  • An instance of the JobQueueClient that the protoc compiler has automatically generated for us from the RPC definition for the job queue
  • The required components for interfacing with the user's bspgraph-based algorithm implementation (that is, a job Runner and Serializer for graph messages and aggregator values)

After obtaining a new Worker instance, ...

Get Hands-On Software Engineering with Golang now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.