Versions in this module Expand all Collapse all v0 v0.0.3 Aug 22, 2022 Changes in this version + var ErrConnectClosed = errors.New("connection closed") + var ErrConnectReconnect = errors.New("connection reconnecting") + type ConnectStatus int32 + const ConnectClosed + const ConnectOpen + const ConnectReconnect + type HConn struct + func NewConn(urlStr string, header http.Header) *HConn + func (c *HConn) CheckHealth() bool + func (c *HConn) Close() + func (c *HConn) ReadMessage() (int, []byte, error) + func (c *HConn) SetWriteDeadline(t time.Time) error + func (c *HConn) Status() ConnectStatus + func (c *HConn) WriteMessage(messageType int, data []byte) error + type JsonResponse struct + Err string + Out string + type Message struct + Module Module + Payload json.RawMessage + Session string + Timestamp string + Type MessageType + func NewJsonMessage(data, err string) *Message + func NewMessage(typ MessageType, mod Module, data []byte) *Message + func (m *Message) Serialize() ([]byte, error) + type MessageBytes []byte + func (mb MessageBytes) Deserialize() (Message, error) + type MessageError struct + Err error + Msg *Message + type MessageType string + const CommandType + const FileType + const JsonType + type Module string + const CopyModule + const FetchModule + const PythonModule + const ShellModule v0.0.2 Aug 21, 2022