micro/debug/log/memory/stream.go
2019-12-17 18:16:45 +00:00

25 lines
322 B
Go

package memory
import (
"github.com/micro/go-micro/debug/log"
)
type logStream struct {
stream <-chan log.Record
stop chan bool
}
func (l *logStream) Chan() <-chan log.Record {
return l.stream
}
func (l *logStream) Stop() error {
select {
case <-l.stop:
return nil
default:
close(l.stop)
}
return nil
}