Documentation
¶
Index ¶
- type LocationProcessor
- func (p *LocationProcessor) GetStats() map[string]interface{}
- func (p *LocationProcessor) OnOrgCreated(ctx context.Context, orgSlug string) error
- func (p *LocationProcessor) OnOrgDeleted(ctx context.Context, orgSlug string) error
- func (p *LocationProcessor) ProcessMessage(ctx context.Context, msg *models.DeviceLocationMessage) error
- func (p *LocationProcessor) ProcessTelemetry(ctx context.Context, payload *models.TelemetryPayload) error
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.
Click to show internal directories.
Click to hide internal directories.