emitters

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Emitters []types.Emitter
View Source
var TimescaleDBConn *pgxpool.Pool

Functions

func CreateEmitter

func CreateEmitter(typename string) (*types.Emitter, error)

func GetTypeNames

func GetTypeNames() []string

func Load

func Load(emitter *types.Emitter) error

func LoadEmitter

func LoadEmitter(emitter *types.Emitter) error

func LoadEmitters

func LoadEmitters()

func RegisterType

func RegisterType(name string, i interface{})

func RunDispatch

func RunDispatch()

Types

type EmitterType

type EmitterType struct {
	Name string `json:"name"`
	Type reflect.Type
}

type RabbitMQDataPoint

type RabbitMQDataPoint struct {
	Signal    string    `json:"signal"`
	Value     float64   `json:"value"`
	Status    int       `json:"status"`
	Timestamp time.Time `json:"timestamp"`
}

type RabbitMQEmitter

type RabbitMQEmitter struct {
	// The attributes below are serialized into the 'Settings' attribute of the Emitter attribute above
	Urls        []string `json:"urls"`
	ChannelName string   `json:"channel"`
	Durable     bool     `json:"durable"`
	Lazy        bool     `json:"lazy"`
	// contains filtered or unexported fields
}

func (*RabbitMQEmitter) GetStats

func (emitter *RabbitMQEmitter) GetStats() *types.EmitterStatistics

Implement IEmitter interface

func (*RabbitMQEmitter) InitEmitter

func (emitter *RabbitMQEmitter) InitEmitter() error

func (*RabbitMQEmitter) ProcessMessage

func (emitter *RabbitMQEmitter) ProcessMessage(dp *types.DataPoint)

func (*RabbitMQEmitter) ProcessMeta

func (emitter *RabbitMQEmitter) ProcessMeta(dp *types.DataPointMeta)

Implement IEmitter interface

type RabbitMQMetaItem added in v0.2.2

type RabbitMQMetaItem struct {
	Signal      string  `json:"signal"`
	Description string  `json:"description"`
	Dimension   string  `json:"dimension"`
	Min         float64 `json:"range_min"`
	Max         float64 `json:"range_max"`
	Deadband    float64 `json:"deadband"`
}

type TimescaleEmitter

type TimescaleEmitter struct {
	Host      string `json:"host"`
	Port      int    `json:"port"`
	User      string `json:"user"`
	Password  string `json:"password"`
	Authident bool   `json:"authident"`
	Database  string `json:"database"`
	Batchsize int    `json:"batchsize"`
	// contains filtered or unexported fields
}

func (*TimescaleEmitter) GetStats

func (emitter *TimescaleEmitter) GetStats() *types.EmitterStatistics

func (*TimescaleEmitter) InitEmitter

func (emitter *TimescaleEmitter) InitEmitter() error

func (*TimescaleEmitter) ProcessMessage

func (emitter *TimescaleEmitter) ProcessMessage(dp *types.DataPoint)

func (*TimescaleEmitter) ProcessMeta

func (emitter *TimescaleEmitter) ProcessMeta(dp *types.DataPointMeta)

Jump to

Keyboard shortcuts

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