Versions in this module Expand all Collapse all v1 v1.0.21 Apr 28, 2026 Changes in this version + const MaxFrameBytes + const MsgTypeBye + const MsgTypeEvent + const MsgTypeHello + const MsgTypeHelloAck + const MsgTypePreShutdownAck + const MsgTypePreShutdownCheck + const MsgTypeShutdown + const MsgTypeSourceStatus + const MsgTypeStatusQuery + const MsgTypeStatusResponse + const SourceStateConnected + const SourceStateConnecting + const SourceStateDisconnected + const SourceStateReconnecting + const WriteTimeout + var ErrFrameTooLarge = errors.New("protocol: frame exceeds MaxFrameBytes") + func Decode(line []byte) (interface{}, error) + func Encode(w io.Writer, msg interface{}) error + func EncodeWithDeadline(conn net.Conn, msg interface{}, timeout time.Duration) error + func ReadFrame(br *bufio.Reader) ([]byte, error) + type Bye struct + Type string + type ConsumerInfo struct + Dropped int64 + EventKey string + PID int + Received int64 + type Event struct + EventID string + EventType string + Payload json.RawMessage + Seq uint64 + SourceTime string + Type string + func NewEvent(eventType, eventID, sourceTime string, seq uint64, payload json.RawMessage) *Event + type Hello struct + EventKey string + EventTypes []string + PID int + Type string + Version string + func NewHello(pid int, eventKey string, eventTypes []string, version string) *Hello + type HelloAck struct + BusVersion string + FirstForKey bool + Type string + func NewHelloAck(busVersion string, firstForKey bool) *HelloAck + type PreShutdownAck struct + LastForKey bool + Type string + func NewPreShutdownAck(lastForKey bool) *PreShutdownAck + type PreShutdownCheck struct + EventKey string + Type string + func NewPreShutdownCheck(eventKey string) *PreShutdownCheck + type Shutdown struct + Type string + func NewShutdown() *Shutdown + type SourceStatus struct + Detail string + Source string + State string + Type string + func NewSourceStatus(source, state, detail string) *SourceStatus + type StatusQuery struct + Type string + func NewStatusQuery() *StatusQuery + type StatusResponse struct + ActiveConns int + Consumers []ConsumerInfo + PID int + Type string + UptimeSec int + func NewStatusResponse(pid int, uptimeSec int, activeConns int, consumers []ConsumerInfo) *StatusResponse