worker

package
v0.0.0-...-99fe3a6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoItemsInQueue = errors.New("no items in queue")

Functions

This section is empty.

Types

type Queue

type Queue[T any] struct {
	Item chan struct{}
	// contains filtered or unexported fields
}

func (*Queue[T]) Dequeue

func (q *Queue[T]) Dequeue() (T, error)

func (*Queue[T]) Enqueue

func (q *Queue[T]) Enqueue(item T)

type Server

type Server struct {
	Supervisor *suture.Supervisor
	// contains filtered or unexported fields
}

func New

func New(device device.Device) (*suture.Supervisor, *Server)

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

func (*Server) SubscribeToActions

func (s *Server) SubscribeToActions(mqttClient MQTT.Client) error

Jump to

Keyboard shortcuts

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