protocol

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeConnectionAck = "connection_ack"
	TypeKeepAlive     = "ka"
	TypeUnsubscribe   = "unsubscribe"
	TypeSubscribe     = "subscribe"
	TypeData          = "data"
	TypePublish       = "publish"

	TypeSubscribeSuccess   = "subscribe_success"
	TypePublishSuccess     = "publish_success"
	TypeUnsubscribeSuccess = "unsubscribe_success"

	TypeError            = "error"
	TypeConnectionError  = "connection_error"
	TypeSubscribeError   = "subscribe_error"
	TypePublishError     = "publish_error"
	TypeUnsubscribeError = "unsubscribe_error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchPublishError added in v0.2.0

type BatchPublishError struct {
	Failures []FailedEvent
}

func (BatchPublishError) Error added in v0.2.0

func (err BatchPublishError) Error() string

func (BatchPublishError) Is added in v0.2.0

func (err BatchPublishError) Is(target error) bool

type ConnectionAckMessage

type ConnectionAckMessage struct {
	TimeoutMs int
}

type DataMessage

type DataMessage struct {
	SubId   string
	Payload app.Payload
}

type ErrorMessage

type ErrorMessage struct {
	ID     string
	Errors []ErrorMetadata
}

type ErrorMetadata

type ErrorMetadata struct {
	Type    string
	Message string
}

type FailedEvent added in v0.2.0

type FailedEvent struct {
	Success    bool
	Index      int
	RawMessage []byte
}

type KeepAliveMessage

type KeepAliveMessage struct{}

type PublishMessage

type PublishMessage struct {
	Destination string
	Payload     app.Payload
}

type PublishResult

type PublishResult struct {
	Err error
}

type PublishResultMessage added in v0.2.0

type PublishResultMessage struct {
	ID       string
	Failures []FailedEvent
}

type SuccessMessage

type SuccessMessage struct {
	ID string
}

Jump to

Keyboard shortcuts

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