1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package pubsub type Message struct { // Command (join, leave, headers) Command string `json:"command"` // Broker (redis, memory) Broker string `json:"broker"` // Topic message been pushed into. Topics []string `json:"topic"` // Payload to be broadcasted Payload []byte `json:"payload"` }