This commit is contained in:
2025-09-19 21:42:28 -04:00
parent 7f8fb011ce
commit 4ba4fe381f
5 changed files with 63 additions and 103 deletions

14
types/message.go Normal file
View File

@@ -0,0 +1,14 @@
package types
type MessageType string
const (
MessageTypeData MessageType = "data"
MessageTypeClose MessageType = "close"
)
type Message struct {
Type MessageType `json:"type"`
StreamID string `json:"stream_id"`
Data []byte `json:"data,omitempty"`
}