reporter

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exception

func Exception(ctx context.Context, info any)

func ExceptionWithContext

func ExceptionWithContext(ctx context.Context, message string, context Context)

func Message

func Message(ctx context.Context, message string)

func MessageWithContext

func MessageWithContext(ctx context.Context, message string, context Context)

func NewContextWithReporter

func NewContextWithReporter(ctx context.Context, reporter Reporter) context.Context

Types

type Context

type Context = map[string]any

type NullReporter

type NullReporter struct{}

func (*NullReporter) ReportException

func (*NullReporter) ReportException(any) error

func (*NullReporter) ReportExceptionWithContext

func (*NullReporter) ReportExceptionWithContext(any, Context) error

func (*NullReporter) ReportMessage

func (*NullReporter) ReportMessage(string) error

func (*NullReporter) ReportMessageWithContext

func (*NullReporter) ReportMessageWithContext(string, Context) error

type Reporter

type Reporter interface {
	ReportException(any) error
	ReportMessage(string) error
	ReportMessageWithContext(string, Context) error
	ReportExceptionWithContext(any, Context) error
}

Reporter represents an external reporting tool which can be hooked into gluon to report key information and/or unexpected behaviors.

func GetReporterFromContext

func GetReporterFromContext(ctx context.Context) (Reporter, bool)

Directories

Path Synopsis
Package mock_reporter is a generated GoMock package.
Package mock_reporter is a generated GoMock package.

Jump to

Keyboard shortcuts

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