Documentation ¶
Overview ¶
Package controller is responsible for creating VMs in various regions, according to * the provided configuration string * The controller is also responsible for initiating probing on the VMs that are created
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommunicatorServer ¶
type CommunicatorServer struct {
UnimplementedProbeCommunicatorServer
}
Handles communication between controller and regional VMs
type Controller ¶
type Controller struct{}
func NewController ¶
func NewController(cfg *ControllerConfig, cmd utils.CommandMaker, clk utils.Timer, log Logger) *Controller
Create a new controller with a provided configuration
func (*Controller) InitProbes ¶
func (ctrl *Controller) InitProbes()
Start all VMs in regions in which the required hardware is available, and for which there are probes specified
func (*Controller) InitServer ¶
func (ctrl *Controller) InitServer()
Start gRPC server for regional VMs to connect to
func (*Controller) MonitorProbes ¶
func (ctrl *Controller) MonitorProbes()
type ControllerLogger ¶
type ControllerLogger struct {
Destination string // Location in Cloud Logger to which errors are logged
}
Logs controller-based errors
func (*ControllerLogger) LogError ¶
func (c *ControllerLogger) LogError(desc string)
Log error to Cloud Logger
func (*ControllerLogger) LogErrorf ¶
func (c *ControllerLogger) LogErrorf(desc string, args ...interface{})
Log error with format
func (*ControllerLogger) LogFatal ¶
func (c *ControllerLogger) LogFatal(desc string)
Log error and terminate program
func (*ControllerLogger) LogFatalf ¶
func (c *ControllerLogger) LogFatalf(desc string, args ...interface{})
Log error with format and terminate program