mqtt

package
v0.0.0-...-456b4fa Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractTrigger

type AbstractTrigger struct {
	trigger.AbstractTrigger

	MQTTClient mqttclient.Client
	// contains filtered or unexported fields
}

func NewAbstractTrigger

func NewAbstractTrigger(parentLogger logger.Logger,
	workerAllocator worker.Allocator,
	configuration *Configuration,
	restartTriggerChan chan trigger.Trigger) (*AbstractTrigger, error)

func (*AbstractTrigger) Connect

func (t *AbstractTrigger) Connect() error

func (*AbstractTrigger) GetConfig

func (t *AbstractTrigger) GetConfig() map[string]interface{}

func (*AbstractTrigger) Start

func (t *AbstractTrigger) Start(checkpoint functionconfig.Checkpoint) error

func (*AbstractTrigger) Stop

type Configuration

type Configuration struct {
	trigger.Configuration
	Subscriptions   []Subscription
	ClientID        string
	ProtocolVersion int
}

func NewConfiguration

func NewConfiguration(id string,
	triggerConfiguration *functionconfig.Trigger,
	runtimeConfiguration *runtime.Configuration) (*Configuration, error)

type Event

type Event struct {
	nuclio.AbstractEvent
	// contains filtered or unexported fields
}

Event allows access to the MQTT message

func (*Event) GetBody

func (e *Event) GetBody() []byte

func (*Event) GetID

func (e *Event) GetID() nuclio.ID

GetID returns the message ID

func (*Event) GetPath

func (e *Event) GetPath() string

GetPath returns the topic of the event

func (*Event) GetTopic

func (e *Event) GetTopic() string

GetTopic returns the topic of the event

func (*Event) GetURL

func (e *Event) GetURL() string

GetURL returns the topic of the event

type Subscription

type Subscription struct {
	Topic string
	QOS   int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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