eventrepo

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment[Payload any] interface {
	IsServiceMessage(message model.ConsumerMessage) bool
	ParseServiceMessage(message model.ConsumerMessage) (deviceId string, serviceId string, payload Payload, err error)
	GetServiceEventDescriptions(deviceId string, serviceId string) ([]model.EventDesc, error)

	IsImportMessage(message model.ConsumerMessage) bool
	ParseImportMessage(message model.ConsumerMessage) (importId string, payload Payload, err error)
	GetImportEventDescriptions(importId string) ([]model.EventDesc, error)

	SerializeMessage(payload Payload, service models.Service) (result model.SerializedMessage, err error)
}

type EventRepo

type EventRepo[Payload any] struct {
	// contains filtered or unexported fields
}

func (*EventRepo[Payload]) Get

func (this *EventRepo[Payload]) Get(message model.ConsumerMessage) (result []model.EventMessageDesc, err error)

type Interface

type Interface interface {
	Get(message model.ConsumerMessage) (eventDesc []model.EventMessageDesc, err error)
}

func New

func New(ctx context.Context, wg *sync.WaitGroup, config configuration.Config, notifier Notifier) (result Interface, err error)

type Notifier

type Notifier interface {
	NotifyError(desc model.EventMessageDesc, err error) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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