Vasiliy Tolstov
06136312bb
* regen files with never protoc * rewrite import path Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
25 lines
329 B
Go
25 lines
329 B
Go
package memory
|
|
|
|
import (
|
|
"github.com/unistack-org/micro/v3/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
|
|
}
|