docs/rpc/streaming/adding-a-topic.md
This document is a guide for adding a new streaming topic.
make proto to generate the Go code from the protobuf.FromChanges function to the list of change functions in
agent/consul/state.processDBChanges. The FromChanges function should examine the
list of Changes and return a list of events that subscriptions would need to update
their view.Payload type, similar to agent/consul/state.EventPayloadCheckServiceNode.
This type will be used in the Payload field of the event.Payload type to the oneof in
proto/pbsubscrube/subscribe.proto Event.Payload. This may require creating other
protobuf types as well, to encode anything in the payload. Run make proto to generate
the Go code from the protobuf.state, to the protobuf type. This may require either writing or generating a
function to convert between the types.