PLT-7407: Back-end plugin mechanism (#7177)
* begin backend plugin wip * flesh out rpcplugin. everything done except for minor supervisor stubs * done with basic plugin infrastructure * simplify tests * remove unused test lines
Этот коммит содержится в:
23
plugin/rpcplugin/io.go
Обычный файл
23
plugin/rpcplugin/io.go
Обычный файл
@@ -0,0 +1,23 @@
|
||||
package rpcplugin
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
type rwc struct {
|
||||
io.ReadCloser
|
||||
io.WriteCloser
|
||||
}
|
||||
|
||||
func (rwc *rwc) Close() error {
|
||||
rerr := rwc.ReadCloser.Close()
|
||||
werr := rwc.WriteCloser.Close()
|
||||
if rerr != nil {
|
||||
return rerr
|
||||
}
|
||||
return werr
|
||||
}
|
||||
|
||||
func NewReadWriteCloser(r io.ReadCloser, w io.WriteCloser) io.ReadWriteCloser {
|
||||
return &rwc{r, w}
|
||||
}
|
||||
Ссылка в новой задаче
Block a user