internal

package
v0.0.0-...-261c782 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	StatusTag  models.TagConfigObject
	ConfigTags ConfigTags
	Version    *string
	Device     DeviceConfig
}

type ConfigTags

type ConfigTags struct {
	VersionTag   models.TagConfigObject
	UpdatedAtTag models.TagConfigObject
}

type DataSource

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

func NewDataSource

func NewDataSource() (*DataSource, error)

func (*DataSource) GetHumidityValue

func (source *DataSource) GetHumidityValue() float64

func (*DataSource) GetLightValue

func (source *DataSource) GetLightValue() bool

func (*DataSource) GetTemperatureValue

func (source *DataSource) GetTemperatureValue() float64

type DeviceConfig

type DeviceConfig struct {
	StatusTag      models.TagConfigObject
	TemperatureTag models.TagConfigObject
	HumidityTag    models.TagConfigObject
	LightTag       models.TagConfigObject
}

type Emulator

type Emulator interface {
	Bootstrap(ctx context.Context) error
	Run(ctx context.Context) error
}

type HTTPEmulator

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

func NewHTTPEmulator

func NewHTTPEmulator(
	logger *zap.Logger, source *DataSource, cli *client.HTTP, timeout time.Duration, login, password string,
) *HTTPEmulator

func (*HTTPEmulator) Bootstrap

func (e *HTTPEmulator) Bootstrap(ctx context.Context) error

func (*HTTPEmulator) Run

func (e *HTTPEmulator) Run(ctx context.Context) error

type MQTTEmulator

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

func NewMQTTEmulator

func NewMQTTEmulator(
	logger *zap.Logger, source *DataSource, cli *client.HTTP, timeout time.Duration, login, password, host string,
) *MQTTEmulator

func (*MQTTEmulator) Bootstrap

func (e *MQTTEmulator) Bootstrap(ctx context.Context) error

func (*MQTTEmulator) Run

func (e *MQTTEmulator) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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