Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendJSON ¶
SendJSON converts payload to JSON and sends on topic to client. payload will be converted to JSON using the following rules:
- if payload is a []byte, string, or bytes.Buffer, it will be sent as-is
- if payload is a proto.Message, it will be converted using protojson.Marshal
- otherwise, it will be converted using json.Marshal
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.