leafmsg

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteMessage

func WriteMessage(ws *websocket.Conn, msgType MessageType, payload interface{}) error

Types

type Message

type Message struct {
	Type MessageType `json:"type" msgpack:"type"`
	// contains filtered or unexported fields
}

func ReadMessage

func ReadMessage(ws *websocket.Conn) (*Message, error)

func (*Message) UnmarshalPayload

func (m *Message) UnmarshalPayload(v interface{}) error

type MessageType

type MessageType byte
const (
	MessageRegister MessageType = iota
	MessageFullSync
	MessageFullSyncEnd
	MessageGossipGroup
	MessageGossipRole
	MessageGossipTemplate
	MessageGossipTemplateVar
	MessageGossipUser
	MessageGossipScript
	MessageGossipSkill
	MessageGossipCommand
	MessageGossipStackDefinition
	MessageGossipResponse
	MessageGossipSpaceUsage
	MessageGossipEventSink
)

type Register

type Register struct {
	LeafVersion string `json:"leaf_version" msgpack:"leaf_version"`
	Zone        string `json:"zone" msgpack:"zone"`
}

type RegisterResponse

type RegisterResponse struct {
	Success  bool   `json:"success" msgpack:"success"`
	Error    string `json:"error" msgpack:"error"`
	Features uint16 `json:"features" msgpack:"features"`
}

Jump to

Keyboard shortcuts

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