mqtt

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBroker

func WithBroker(broker string) func(*Opts)

func WithClientID

func WithClientID(clientID string) func(*Opts)

func WithKeepAlive

func WithKeepAlive(keepAlive time.Duration) func(*Opts)

func WithPassword

func WithPassword(password string) func(*Opts)

func WithQOS

func WithQOS(qos byte) func(*Opts)

func WithRetained

func WithRetained(retained bool) func(*Opts)

func WithTopic

func WithTopic(topic string) func(*Opts)

func WithUserName

func WithUserName(userName string) func(*Opts)

Types

type Destination

type Destination struct {
	// contains filtered or unexported fields
}

func NewDestination

func NewDestination(opts ...OptFunc) (*Destination, error)

func (*Destination) Run

func (dest *Destination) Run(ctx context.Context) error

func (*Destination) Send

func (dest *Destination) Send(ctx context.Context, ack func(), msgs ...kawa.Message[[]byte]) error

type OptFunc

type OptFunc func(*Opts)

type Opts

type Opts struct {
	// contains filtered or unexported fields
}

type Source

type Source struct {
	// contains filtered or unexported fields
}

func NewSource

func NewSource(opts ...OptFunc) (*Source, error)

func (*Source) Recv

func (src *Source) Recv(ctx context.Context) (kawa.Message[[]byte], func(), error)

func (*Source) Run

func (src *Source) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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