tanfarming
changed the title
tanfarming:ads/go_server_combined
go_server: unify logging and Pub/Sub behind a transport option
…tion
- Replace the go_server_pubsub outputter (shipped in 19.2.0) with a
`transport` option on the existing go_server outputter, with three
modes:
- `-s transport=logging`: stdout MozLog (default, unchanged behavior)
- `-s transport=pubsub`: Pub/Sub message builder
- `-s transport=combined`: both in one file, sharing common types
- The combined mode lets the one known 19.2.0 consumer migrate
incrementally without running two parallel build pipelines.
- Add an optional `DocumentID` field on each ping params struct. If set,
it is used as the ping's `document_id`; otherwise a fresh UUID is
generated. Set the same `DocumentID` on a params value passed to both
`RecordXxxPing` and `BuildXxxMessage` to share an ID across transports
during dual-write verification.
- Extract per-ping payload assembly into a shared
`(p XxxPing).buildPayload(...)` helper so the logging and Pub/Sub
code paths share one source of truth for metrics-map / events-slice
construction.
- BREAKING: the go_server_pubsub outputter is removed; callers must
switch to `--format go_server -s transport=pubsub`.