Documentation
¶
Index ¶
Constants ¶
View Source
const ( MessageFormat = "%s||%s||%s" // message key || message type || message body MessageSeparator = "||" )
Variables ¶
This section is empty.
Functions ¶
func FormatMessage ¶
func FormatMessage(msgKey string, messageType MessageType, body string) string
Types ¶
type HTTPMessage ¶ added in v0.16.6
type HTTPMessage struct {
Hijack bool `json:"hijack,omitempty"`
Host string `json:"host,omitempty"`
Method string `json:"method,omitempty"`
URL string `json:"url,omitempty"`
Headers map[string][]string `json:"headers,omitempty"`
Code int `json:"code,omitempty"`
Body []byte `json:"body,omitempty"`
EOF bool `json:"eof,omitempty"`
}
type MessageType ¶
type MessageType string
const ( Connect MessageType = "0" Body MessageType = "1" Close MessageType = "2" )
Click to show internal directories.
Click to hide internal directories.