xmidt-org / wrp-go

go implementation of the Web Routing Protocol
Apache License 2.0
4 stars 7 forks source link

Add Device ID Field to WRP SimpleEvent and RequestResponse #53

Open kristinapathak opened 4 years ago

kristinapathak commented 4 years ago

https://github.com/xmidt-org/wrp-go/blob/435f06387fdacb1bb7e76cd1cdb092fb1fb69312/messages.go#L315

The Source of a SimpleEvent is no longer always the device ID, so to provide an easy way to understand what device the event is for, we will add a separate field for that. The field should also be added to the general wrp.Message struct and the RequestResponse struct, so that Device ID can be added for responses.

This update will match the new spec after https://github.com/xmidt-org/docs/issues/51 is fixed.

kristinapathak commented 4 years ago

The new field should also be added everywhere applicable, such as the translation of struct to headers: https://github.com/xmidt-org/wrp-go/blob/435f06387fdacb1bb7e76cd1cdb092fb1fb69312/wrphttp/headers.go#L231