Ejemplo n.º 1
0
func NewMockRecorder(iepg *pt.IEPG) Recorder {
	return &MockRecorder{
		iepg:        iepg,
		stats:       iepg.NewStats(),
		c:           0,
		stopChannel: nil,
	}
}
Ejemplo n.º 2
0
// NewPT1Recorder returns a new instance of *PT1Recorder
func NewPT1Recorder(iepg *pt.IEPG, cfg *Config, notifier Notifier) Recorder {
	if cfg == nil {
		cfg = DefaultConfig
	}
	recorder := &PT1Recorder{}
	recorder.iepg = iepg
	recorder.stats = iepg.NewStats()
	recorder.cfg = cfg
	recorder.notifier = notifier
	recorder.logger = wcg.NewLoggerWithPrefix(nil, fmt.Sprintf("pt1recorder.%s", iepg.ID))
	return recorder
}