tree: 6753827748efcd93b533a9c6fc8005988387fe28 [path history] [tgz]
  1. .gitignore
  2. BUILD.bazel
  3. Makefile
  4. README.md
  5. go/
  6. images/
  7. karma.conf.ts
  8. modules/
  9. pages/
  10. secrets/
  11. tsconfig.json
  12. webpack.config.ts
machine/README.md

Machine Server

The machine state server is a centralized management application for device testing.

See the Design Doc.

Code structure

The main code is structure as:

go/machine/
    source/
    processor/
    store/

Where:

  • types contains the Go types used across the rest of the modules.
  • The source module contains source.Source, a way to get update events from machines.
  • The store module contains store.Store, a way to persist and retrieve each machine's state.
  • The processor module contains processor.Processor, a way to update a machine state from an incoming event.

The main loop of machine state server looks like:

for event := range eventCh {
	store.Update(ctx, event.Host.Name, func(previous machine.Description) machine.Description {
		return processor.Process(ctx, previous, event)
	})
}

test_machine_monitor

The application that runs on each switchboard test machine and feeds information into the machine state server.

See the Design Doc.