services

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocationProcessor

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

LocationProcessor processes device location messages and stores them in Psql

func NewLocationProcessor

func NewLocationProcessor(tsClient *timescaledb.Client, ruleRegistry *registry.RuleRegistry, logger *zap.Logger) *LocationProcessor

NewLocationProcessor creates a new location processor

func (*LocationProcessor) GetStats

func (p *LocationProcessor) GetStats() map[string]interface{}

GetStats returns processor statistics

func (*LocationProcessor) OnOrgCreated

func (p *LocationProcessor) OnOrgCreated(ctx context.Context, orgSlug string) error

OnOrgCreated is invoked when a new organization is created. It ensures any organization-specific setup is performed, such as creating a dedicated DB schema.

func (*LocationProcessor) OnOrgDeleted

func (p *LocationProcessor) OnOrgDeleted(ctx context.Context, orgSlug string) error

OnOrgDeleted is invoked when an organization is deleted. It performs cleanup for organization-specific resources such as dropping the DB schema.

func (*LocationProcessor) ProcessMessage

func (p *LocationProcessor) ProcessMessage(ctx context.Context, msg *models.DeviceLocationMessage) error

ProcessMessage processes a device location message

func (*LocationProcessor) ProcessTelemetry

func (p *LocationProcessor) ProcessTelemetry(ctx context.Context, payload *models.TelemetryPayload) error

ProcessTelemetry processes the entity-centric telemetry payload and stores it in the entities schema.

Jump to

Keyboard shortcuts

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