mqtt

package
v0.0.0-...-c1a9e9f Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelBindings

type ChannelBindings struct {
	PublisherBindings  OperationBindings
	SubscriberBindings OperationBindings
}

Params below are passed to the New* implementation functions

type Consumer

type Consumer interface {
	Subscriber(ctx context.Context, channelName string, bindings *ChannelBindings) (Subscriber, error)
}

Sub

type EnvelopeMarshaler

type EnvelopeMarshaler interface {
	MarshalMQTTEnvelope(envelope EnvelopeWriter) error
}

type EnvelopeReader

type EnvelopeReader interface {
	io.Reader
	Headers() run.Headers
}

Sub

type EnvelopeUnmarshaler

type EnvelopeUnmarshaler interface {
	UnmarshalMQTTEnvelope(envelope EnvelopeReader) error
}

type EnvelopeWriter

type EnvelopeWriter interface {
	io.Writer
	ResetPayload()
	SetHeaders(headers run.Headers)
	SetContentType(contentType string)
	SetBindings(bindings MessageBindings)

	SetTopic(topic string)
	SetQoS(qos byte)
	SetRetained(retained bool)
}

Pub

type LastWill

type LastWill struct {
	Topic   string
	QoS     int
	Message string
	Retain  bool
}

Params below are passed to the New* implementation functions

type MessageBindings

type MessageBindings struct{}

Params below are passed to the New* implementation functions

type OperationBindings

type OperationBindings struct {
	QoS    int
	Retain bool
}

Params below are passed to the New* implementation functions

type Producer

type Producer interface {
	Publisher(ctx context.Context, channelName string, bindings *ChannelBindings) (Publisher, error)
}

Pub

type Publisher

type Publisher interface {
	Send(ctx context.Context, envelopes ...EnvelopeWriter) error
	Close() error
}

Pub

type ServerBindings

type ServerBindings struct {
	ClientID     string
	CleanSession bool
	LastWill     *LastWill
	KeepAlive    time.Duration
}

Params below are passed to the New* implementation functions

type Subscriber

type Subscriber interface {
	Receive(ctx context.Context, cb func(envelope EnvelopeReader)) error
	Close() error
}

Sub

Jump to

Keyboard shortcuts

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