Documentation
¶
Overview ¶
Package runner は汎用的な並列実行基盤を提供します。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type EventType
JobIndex int
JobName string
Status ResultStatus
Err error
Duration time.Duration
Timestamp time.Time
}
Event はジョブ実行中に発火する通知イベントです。
type EventLogger ¶
type EventLogger struct {
// contains filtered or unexported fields
}
EventLogger はジョブ実行イベントをファイルに記録します。
func NewEventLogger ¶
func NewEventLogger(path string) (*EventLogger, error)
NewEventLogger は指定パスにログファイルを作成し、EventLogger を返します。
func (*EventLogger) Close ¶
func (l *EventLogger) Close() error
Close はログファイルを閉じます。書き込みエラーがあった場合はそれも報告します。
func (*EventLogger) LogEvent ¶
func (l *EventLogger) LogEvent(event *Event)
LogEvent はイベントを1行のログとしてファイルに書き込みます。
func (*EventLogger) WriteSummary ¶
func (l *EventLogger) WriteSummary(summary Summary)
WriteSummary はログ末尾にサマリーを書き込みます。
type Result ¶
type Result struct {
Name string
Status ResultStatus
Err error
Duration time.Duration
}
Result は単一ジョブの実行結果です。
type ResultStatus ¶
type ResultStatus string
ResultStatus はジョブ実行結果の状態です。
const ( StatusSuccess ResultStatus = "success" StatusFailed ResultStatus = "failed" StatusSkipped ResultStatus = "skipped" )
Click to show internal directories.
Click to hide internal directories.