error_service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorServiceClosed = errors.New("error service closed")
View Source
var EventQueueIsEmpty = errors.New("event queue is empty")
View Source
var SlowEventHandler = errors.New("event handler is very slow; some messages are lost")

Functions

func New

Types

type ErrorHandlerMock

type ErrorHandlerMock struct {
	contracts.EventHandlerInterface

	/*
		You need to substitute *Mock methods to do substitute original functions
	*/
	NewMock func(level contracts.Level, eventMessage string, extra map[string]interface{})
}

func (*ErrorHandlerMock) New

func (tm *ErrorHandlerMock) New(level contracts.Level, eventMessage string, extra map[string]interface{})

type EventHandler

type EventHandler struct {
	contracts.EventHandlerInterface
	// contains filtered or unexported fields
}

func (*EventHandler) New

func (eh *EventHandler) New(level contracts.Level, eventMessage string, extra map[string]interface{})

func (*EventHandler) Run

func (eh *EventHandler) Run() error

type Options

type Options struct {
	/*
		Configure the function using the desired error handler (for example, file logger, Sentry or other)
	*/
	EventHandlers map[contracts.Level]func(event contracts.EventError)
	Debug         bool
	EventCap      int
}

Jump to

Keyboard shortcuts

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