Help us shape the future of Go! Take the 2026 Go Developer Survey

report

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	ID            uuid.UUID
	Name          string
	AggregateName string
	AggregateID   uuid.UUID
	Payload       any
}

type Option

type Option func(*Report)

Option is a Report option.

func Error

func Error(err error) Option

Error returns a ReportOption that adds the execution error of a Command to a Report.

func Runtime

func Runtime(d time.Duration) Option

Runtime returns an Option that specifies the runtime of a Command execution.

type Report

type Report struct {
	Command Command
	Runtime time.Duration
	Error   error
}

A Report provides information about the execution of a Command.

func New

func New(cmd Command, opts ...Option) Report

New returns a new Report that is filled with the information from opts.

func (*Report) Report

func (r *Report) Report(rep Report)

Jump to

Keyboard shortcuts

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