diff options
author | Valery Piashchynski <[email protected]> | 2021-05-27 19:59:04 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-05-27 19:59:04 +0300 |
commit | e701d4d97fbbc7551e5d931731890933687ca8cd (patch) | |
tree | 8161a022a5b74ce6660ed154344134ec493c3f74 /plugins/websockets/doc/doc.go | |
parent | 1ee9f178f95c777d60afae4ac3a74e6134001e27 (diff) |
- Update Makefile
- Update arch diagram
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/websockets/doc/doc.go')
-rw-r--r-- | plugins/websockets/doc/doc.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/websockets/doc/doc.go b/plugins/websockets/doc/doc.go new file mode 100644 index 00000000..fc214be8 --- /dev/null +++ b/plugins/websockets/doc/doc.go @@ -0,0 +1,27 @@ +package doc + +/* +RPC message structure: + +type Msg struct { + // Topic message been pushed into. + Topics_ []string `json:"topic"` + + // Command (join, leave, headers) + Command_ string `json:"command"` + + // Broker (redis, memory) + Broker_ string `json:"broker"` + + // Payload to be broadcasted + Payload_ []byte `json:"payload"` +} + +1. Topics - string array (slice) with topics to join or leave +2. Command - string, command to apply on the provided topics +3. Broker - string, pub-sub broker to use, for the one-node systems might be used `memory` broker or `redis`. For the multi-node - +`redis` broker should be used. +4. Payload - raw byte array to send to the subscribers (binary messages). + + +*/ |