eventlog

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Uplink      = "up"
	ACK         = "ack"
	Join        = "join"
	Error       = "error"
	Status      = "status"
	Location    = "location"
	TxAck       = "txack"
	Integration = "integration"
)

Event types.

Variables

This section is empty.

Functions

func GetEventLogForDevice

func GetEventLogForDevice(ctx context.Context, devEUI lorawan.EUI64, eventsChan chan EventLog) error

GetEventLogForDevice subscribes to the device events for the given DevEUI and sends this to the given channel.

func LogEventForDevice

func LogEventForDevice(devEUI lorawan.EUI64, t string, msg proto.Message) error

LogEventForDevice logs an event for the given device.

Types

type EventLog

type EventLog struct {
	Type        string
	PublishedAt *timestamp.Timestamp
	Payload     json.RawMessage
	StreamID    string
}

EventLog contains an event log.

type PublishedAtMessage

type PublishedAtMessage interface {
	proto.Message
	GetPublishedAt() *timestamp.Timestamp
}

PublishedAtMessage implements the proto.Message with PublishedAt getter.

Jump to

Keyboard shortcuts

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