2020-07-17 18:09:18 +00:00
|
|
|
package journal
|
|
|
|
|
|
|
|
type nilJournal struct{}
|
|
|
|
|
|
|
|
// nilj is a singleton nil journal.
|
|
|
|
var nilj Journal = &nilJournal{}
|
|
|
|
|
|
|
|
func NilJournal() Journal {
|
|
|
|
return nilj
|
|
|
|
}
|
|
|
|
|
|
|
|
func (n *nilJournal) RegisterEventType(_, _ string) EventType { return EventType{} }
|
|
|
|
|
2020-08-26 15:09:37 +00:00
|
|
|
func (n *nilJournal) RecordEvent(_ EventType, _ func() interface{}) {}
|
2020-07-17 18:09:18 +00:00
|
|
|
|
|
|
|
func (n *nilJournal) Close() error { return nil }
|