feat: tipos WSHub, WSClient, WSMessage, SSEEvent (issue 0011 fase 1)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package infra
|
||||
|
||||
// WSMessage es un mensaje tipado que viaja por WebSocket.
|
||||
// El campo Type permite al receptor decidir como procesar el payload.
|
||||
type WSMessage struct {
|
||||
Type string `json:"type"`
|
||||
Payload []byte `json:"payload"`
|
||||
SenderID string `json:"sender_id"`
|
||||
Ts int64 `json:"ts"`
|
||||
}
|
||||
Reference in New Issue
Block a user