events

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(instanceID, operationID string, err error, format string, args ...any)

func Infof

func Infof(instanceID, operationID, format string, args ...any)

Types

type Config

type Config struct {
	Enabled       bool          `envconfig:"default=false"`
	Retention     time.Duration `envconfig:"default=336h"` // two weeks: 24*14 = 336
	PollingPeriod time.Duration `envconfig:"default=1h"`
}

type Interface

type Interface interface {
	ListEvents(filter events.EventFilter) ([]events.EventDTO, error)
	InsertEvent(eventLevel events.EventLevel, message, instanceID, operationID string)
	RunGarbageCollection(pollingPeriod, retention time.Duration)
}

func New

func New(cfg Config, events Interface) Interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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