message

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Type Type   `json:"type"`
	Data string `json:"data"`
}

type Type

type Type string

Type 消息类型

const (
	TypeHeartbeat Type = "heartbeat" // 心跳消息
	TypeMessage   Type = "message"   // 业务消息
	TypeError     Type = "error"     // 错误消息
)

type WsMessage

type WsMessage struct {
	ClientID string  `json:"client_id"`
	Message  Message `json:"message"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL