control

package
v0.0.0-...-c29a6f0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MissionControl

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

MissionControl handles everything :)

func New

func New(opts ...Option) (*MissionControl, error)

New creates and initializes a new MissionControl

func (*MissionControl) Run

func (m *MissionControl) Run(ctx context.Context) error

Run runs mission control and only returns if there is an error or the provided context is cancelled. It will never return nil

func (*MissionControl) SetItem

func (m *MissionControl) SetItem(ctx context.Context, thingID, propID string, payloadValue interface{}) error

type Option

type Option func(m *MissionControl) error

Option is an option for a new MissionControl instance

func WithLogger

func WithLogger(l *logrus.Logger) Option

WithLogger is a MissionControl option that configures the logger to use

func WithMQTTClient

func WithMQTTClient(cli mqtt.Client) Option

WithMQTTClient is a MissonControl option that configures the MQTT client to use

func WithRegistry

func WithRegistry(r registry.Registry) Option

WithRegistry is a MissionControl option that configures the thing registry to use

Jump to

Keyboard shortcuts

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