report

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT 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       interface{}
}

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