1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-28 17:43:28 +08:00
Files
kubo/util/pipes/duplex.go
2014-11-01 16:07:56 -07:00

15 lines
238 B
Go

package pipes
// Duplex is a simple duplex channel
type Duplex struct {
In chan []byte
Out chan []byte
}
func NewDuplex(bufsize int) Duplex {
return Duplex{
In: make(chan []byte, bufsize),
Out: make(chan []byte, bufsize),
}
}