mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 03:17:43 +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),
|
|
}
|
|
}
|