summaryrefslogtreecommitdiff
path: root/pkg/server/module/hex.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/server/module/hex.go')
-rw-r--r--pkg/server/module/hex.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/server/module/hex.go b/pkg/server/module/hex.go
index 8a25e50..c3ad0db 100644
--- a/pkg/server/module/hex.go
+++ b/pkg/server/module/hex.go
@@ -9,7 +9,7 @@ import (
type hexModule struct{}
-func hexEncoder(rq, wq queue.Q) error {
+func (h hexModule) Send(rq, wq queue.Q) error {
enc := hex.NewEncoder(wq.Writer())
for b := range rq {
@@ -19,14 +19,14 @@ func hexEncoder(rq, wq queue.Q) error {
return nil
}
-func hexDecoder(rq, wq queue.Q) error {
+func (h hexModule) Recv(rq, wq queue.Q) error {
r := hex.NewDecoder(rq.Reader())
w := wq.Writer()
return queue.IoCopy(r, w)
}
-func (m hexModule) Open(env env.Env) (Pipe, Pipe) {
- return hexEncoder, hexDecoder
+func (m hexModule) Open(env env.Env) (interface{}, error) {
+ return m, nil
}
func init() {