event

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Event

func Event(e *event.Event)

Event client call this function to record a event

func EventErrorPipeline added in v1.1.3

func EventErrorPipeline(name string, msg string)

EventErrorPipeline record a pipeline error event

func EventInfoPipeline added in v1.1.3

func EventInfoPipeline(name string, msg string)

EventInfoPipeline record a pipeline info event

func Init

func Init()

Init generate a recorder for global use

Types

type Recorder

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

Recorder record event. Aggregate events and delete old events regularly

var DefaultRecorder *Recorder

DefaultRecorder global default event recorder

func New

func New() (*Recorder, error)

New Returns a new Recorder

func (Recorder) Event

func (r Recorder) Event(e *event.Event)

Event pass event to income chan

func (Recorder) Loop

func (r Recorder) Loop(ctx context.Context)

Loop start event record loop

Jump to

Keyboard shortcuts

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