aggregator

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorAggregator

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

ErrorAggregator is used to generate the aggreagetor error message

func NewErrorAggregator

func NewErrorAggregator(l *LogFiles, logger *logger.Logger) (*ErrorAggregator, error)

NewErrorAggregator create an error aggregator

func (*ErrorAggregator) DumpExitSummary

func (a *ErrorAggregator) DumpExitSummary(exitInfo *RuntimeExitInfo, dumpFile io.Writer) error

DumpExitSummary dump the summarized exit info into file

func (*ErrorAggregator) ExitInfoPrefix

func (a *ErrorAggregator) ExitInfoPrefix() string

ExitInfoPrefix get aggregate log prefix

func (*ErrorAggregator) ExitInfoSuffix

func (a *ErrorAggregator) ExitInfoSuffix() string

ExitInfoSuffix get aggregate log suffix

func (*ErrorAggregator) GenerateExitInfo

func (a *ErrorAggregator) GenerateExitInfo(userExitCode int) (*RuntimeExitInfo, error)

GenerateExitInfo is used to generate the exit info

func (*ErrorAggregator) LoadRuntimeErrorSpecs

func (a *ErrorAggregator) LoadRuntimeErrorSpecs(fileName string) error

LoadRuntimeErrorSpecs is used to load error spec from configured yaml file

func (*ErrorAggregator) SetMaxAggregateLogSize

func (a *ErrorAggregator) SetMaxAggregateLogSize(size int)

SetMaxAggregateLogSize to set maxAggregateLogSize and used for test

type ErrorLogs

type ErrorLogs struct {
	User     *string `yaml:"user,omitempty"`
	Platform *string `yaml:"platform,omitempty"`
}

ErrorLogs contain the platform and user error logs

type LogFiles

type LogFiles struct {
	UserLog         string
	RuntimeErrorLog string
}

LogFiles point the path for userLog and platLog

type RuntimeExitInfo

type RuntimeExitInfo struct {
	Exitcode                 int        `yaml:"exitCode"`
	Trigger                  *string    `yaml:"trigger,omitempty"`
	OriginUserExitCode       int        `yaml:"originUserExitCode"`
	MatchedUserLogString     *string    `yaml:"matchedUserLogString,omitempty"`
	MatchedPlatformLogString *string    `yaml:"matchedPlatformLogString,omitempty"`
	CaughtException          *string    `yaml:"caughtException,omitempty"`
	ErrorLogs                *ErrorLogs `yaml:"errorLogs,omitempty"`
}

RuntimeExitInfo the aggregated exit info

Jump to

Keyboard shortcuts

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