1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-18 08:26:38 +02:00
go-micro/debug/log/stream.go
2019-12-17 16:56:55 +00:00

21 lines
260 B
Go

package log
type logStream struct {
stream <-chan Record
stop chan bool
}
func (l *logStream) Chan() <-chan Record {
return l.stream
}
func (l *logStream) Stop() error {
select {
case <-l.stop:
return nil
default:
close(l.stop)
}
return nil
}