summaryrefslogtreecommitdiff
path: root/payload.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-11 21:54:45 +0300
committerWolfy-J <[email protected]>2018-06-11 21:54:45 +0300
commitcb12a087ed8b0054ad40d0b3f63f1b477796baba (patch)
treeea219459242963423530aea9487b8b7473a85715 /payload.go
parent230fc1eccaae7aa8764a2ab0f098bc72c07e3322 (diff)
no library dependency
Diffstat (limited to 'payload.go')
-rw-r--r--payload.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/payload.go b/payload.go
index 9e1366df..154cec95 100644
--- a/payload.go
+++ b/payload.go
@@ -1,9 +1,5 @@
package roadrunner
-import (
- "bufio"
-)
-
// Payload carries binary header and body to workers and
// back to the server.
type Payload struct {
@@ -12,32 +8,9 @@ type Payload struct {
// body contains binary payload to be processed by worker.
Body []byte
-
- // attached when worker responds with the stream
- stream *bufio.Reader
-
- // close callback will be called when payload is closed
- cc func()
}
// String returns payload body as string
func (p *Payload) String() string {
return string(p.Body)
}
-
-// Stream returns true is payload is streaming.
-func (p *Payload) Stream() bool {
- return p.stream != nil
-}
-
-// Stream returns associated stream.
-func (p *Payload) Read(d []byte) (n int, err error) {
- return p.stream.Read(d)
-}
-
-// Close closes underlying stream and notifies stream end watchers.
-func (p *Payload) Close() {
- if p.cc != nil {
- p.cc()
- }
-}