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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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