We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 74cfbc9 + 486ddd7 commit 8c228d7Copy full SHA for 8c228d7
diskqueue.go
@@ -47,7 +47,7 @@ func (l LogLevel) String() string {
47
48
type Interface interface {
49
Put([]byte) error
50
- ReadChan() chan []byte // this is expected to be an *unbuffered* channel
+ ReadChan() <-chan []byte // this is expected to be an *unbuffered* channel
51
Close() error
52
Delete() error
53
Depth() int64
@@ -140,8 +140,8 @@ func (d *diskQueue) Depth() int64 {
140
return atomic.LoadInt64(&d.depth)
141
}
142
143
-// ReadChan returns the []byte channel for reading data
144
-func (d *diskQueue) ReadChan() chan []byte {
+// ReadChan returns the receive-only []byte channel for reading data
+func (d *diskQueue) ReadChan() <-chan []byte {
145
return d.readChan
146
147
0 commit comments