mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-28 17:43:28 +08:00
15 lines
238 B
Go
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),
|
|
}
|
|
}
|