pahomqtt

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mqtt.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, serverURL string, bindings *runMqtt.ServerBindings, initClientOptions *mqtt.ClientOptions) (*Client, error)

func (*Client) Publisher

func (c *Client) Publisher(_ context.Context, channelName string, bindings *runMqtt.ChannelBindings) (runMqtt.Publisher, error)

func (*Client) Subscriber

func (c *Client) Subscriber(ctx context.Context, channelName string, bindings *runMqtt.ChannelBindings) (runMqtt.Subscriber, error)

type EnvelopeIn

type EnvelopeIn struct {
	mqtt.Message
	// contains filtered or unexported fields
}

func NewEnvelopeIn

func NewEnvelopeIn(msg mqtt.Message) *EnvelopeIn

func (*EnvelopeIn) Headers

func (e *EnvelopeIn) Headers() run.Headers

func (*EnvelopeIn) Read

func (e *EnvelopeIn) Read(p []byte) (n int, err error)

type EnvelopeOut

type EnvelopeOut struct {
	OutboundMessage
	// contains filtered or unexported fields
}

func NewEnvelopeOut

func NewEnvelopeOut() *EnvelopeOut

func (*EnvelopeOut) ResetPayload

func (e *EnvelopeOut) ResetPayload()

func (*EnvelopeOut) SetBindings

func (e *EnvelopeOut) SetBindings(bindings runMqtt.MessageBindings)

func (*EnvelopeOut) SetContentType

func (e *EnvelopeOut) SetContentType(contentType string)

func (*EnvelopeOut) SetHeaders

func (e *EnvelopeOut) SetHeaders(headers run.Headers)

func (*EnvelopeOut) SetQoS

func (e *EnvelopeOut) SetQoS(qos byte)

func (*EnvelopeOut) SetRetained

func (e *EnvelopeOut) SetRetained(retained bool)

func (*EnvelopeOut) SetTopic

func (e *EnvelopeOut) SetTopic(topic string)

type ImplementationRecord

type ImplementationRecord interface {
	Bytes() []byte
}

type OutboundMessage

type OutboundMessage struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

type PublishChannel

type PublishChannel struct {
	Client mqtt.Client
	Topic  string
	// contains filtered or unexported fields
}

func (*PublishChannel) Close

func (r *PublishChannel) Close() error

func (*PublishChannel) Send

func (r *PublishChannel) Send(ctx context.Context, envelopes ...runMqtt.EnvelopeWriter) error

type SubscribeChannel

type SubscribeChannel struct {
	Client mqtt.Client
	Topic  string
	// contains filtered or unexported fields
}

func (*SubscribeChannel) Close

func (r *SubscribeChannel) Close() error

func (*SubscribeChannel) Receive

func (r *SubscribeChannel) Receive(ctx context.Context, cb func(envelope runMqtt.EnvelopeReader)) error

Jump to

Keyboard shortcuts

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