mqtt_action_router

package
v0.0.0-...-671e25a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

func New

func New(client mqtt.Client, debounce time.Duration, allowConcurrentActions bool) *Router

func (*Router) AddAction

func (a *Router) AddAction(setTopic string, arguments interface{}, on func(interface{}) error, off func(interface{}) error, baseState State, getTopic string) error

func (*Router) RemoveAction

func (a *Router) RemoveAction(setTopic string) error

func (*Router) RemoveAllActions

func (a *Router) RemoveAllActions() error

type State

type State int64
const (
	Unknown State = -1
	Off     State = 0
	On      State = 1
)

Jump to

Keyboard shortcuts

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