server/

directory
v0.0.0-...-456cde5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: Apache-2.0

README

Swarming server Go code

To deploy from a local checkout:

gae.py upload -A chromium-swarm-dev default-go

To run locally using fake bots and tasks (but with real Datastore and real RBE):

# Terminal 1: launch the server locally and keep it running.
cd server/cmd/default
go run main.go \
  -cloud-project chromium-swarm-dev \
  -shared-hmac-secret devsecret://aaaa \
  -primary-tink-aead-key devsecret-gen://tink/aead \
  -expose-integration-mocks

# Terminal 2: launch a fake bot and keep it running.
cd server/testing/fakebot
go run main.go -bot-id fake-bot-1 -pool "${USER}-local-test"

# Terminal 3: launch a task and see it handled by the fake bot.
cd server/testing/fakesubmit
go run main.go -pool "${USER}-local-test"

Note that these tests hit real RBE instance (by default default_instance in chromium-swarm-dev project), so they may theoretically interfere with other similar tests running on other machines or even with real chromium-swarm-dev RBE traffic. pool dimension can be used to namespace them.

Directories

Path Synopsis
Package acls implements access control checks for Swarming APIs.
Package acls implements access control checks for Swarming APIs.
Package botapi implements core Bot API handlers.
Package botapi implements core Bot API handlers.
Package botsrv knows how to handle calls from Swarming bots.
Package botsrv knows how to handle calls from Swarming bots.
bq
Package bq implements the export of datastore objects to bigquery.
Package bq implements the export of datastore objects to bigquery.
taskspb
Package taskspb contains proto definitions for tq.Tasks payloads used in swarming-go.
Package taskspb contains proto definitions for tq.Tasks payloads used in swarming-go.
cfg
Package cfg implements Swarming server configuration logic.
Package cfg implements Swarming server configuration logic.
cfgtest
Package cfgtest allows to mock Swarming configs for tests.
Package cfgtest allows to mock Swarming configs for tests.
internalcfgpb
Package internalcfgpb contains messages used by Swarming config system.
Package internalcfgpb contains messages used by Swarming config system.
Package cipd is a CIPD client used by the Swarming server.
Package cipd is a CIPD client used by the Swarming server.
cmd
Package cursor contains logic for marshalling pagination cursors.
Package cursor contains logic for marshalling pagination cursors.
cursorpb
Package cursorpb contains proto messages with pagination cursors.
Package cursorpb contains proto messages with pagination cursors.
Package hmactoken implements generation and validation HMAC-tagged Swarming tokens.
Package hmactoken implements generation and validation HMAC-tagged Swarming tokens.
Package metrics defines metrics used in Swarming.
Package metrics defines metrics used in Swarming.
Package model contains definition of Swarming Datastore entities.
Package model contains definition of Swarming Datastore entities.
internalmodelpb
Package internalmodelpb contains messages used by Swarming data model.
Package internalmodelpb contains messages used by Swarming data model.
Package notifications contains the logic about send Swarming notifications.
Package notifications contains the logic about send Swarming notifications.
taskspb
Package taskspb contains Cloud Tasks proto definations which will be used for sending notifications.
Package taskspb contains Cloud Tasks proto definations which will be used for sending notifications.
Package pyproxy facilities migrating traffic from Python to Go.
Package pyproxy facilities migrating traffic from Python to Go.
Package rbe implements communication with RBE APIs.
Package rbe implements communication with RBE APIs.
Package rpcs implements public API RPC handlers.
Package rpcs implements public API RPC handlers.
Package scan implements functionality for scanning Swarming datastore.
Package scan implements functionality for scanning Swarming datastore.
Package tasks contains code to manage a task's lifecycle.
Package tasks contains code to manage a task's lifecycle.
taskspb
Package taskspb contains Cloud Tasks proto definations which will be used for tasks workflow management.
Package taskspb contains Cloud Tasks proto definations which will be used for tasks workflow management.
testing
fakebot
Command fakebot calls Swarming RBE API endpoints to test them.
Command fakebot calls Swarming RBE API endpoints to test them.
fakesubmit
Command fakesubmit submits an RBE reservation for testing fakebot.
Command fakesubmit submits an RBE reservation for testing fakebot.
getreservation
Command getreservation fetches reservation status from RBE.
Command getreservation fetches reservation status from RBE.
integrationmocks
Package integrationmocks exposes endpoints to simplify integration testing.
Package integrationmocks exposes endpoints to simplify integration testing.
Package validate contains validation for RPC requests and Config entries.
Package validate contains validation for RPC requests and Config entries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL