summaryrefslogtreecommitdiff
path: root/pkg/payload/payload.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-20 18:28:46 +0300
committerValery Piashchynski <[email protected]>2020-12-20 18:28:46 +0300
commitf4a36c7f684216fb408693a6c494486144df57cf (patch)
treee1b61bf7e74cb63aa45f9ca0284a4cffe8e06b0e /pkg/payload/payload.go
parentfbd5adde5abae6f7adb7fcdafc226bcd3480d498 (diff)
parenta10d20d20e910ed8fcfbc3bc690aaf17ee338ff3 (diff)
Merge remote-tracking branch 'origin/2.0' into plugin/redis
# Conflicts: # go.sum # pkg/pipe/pipe_factory_test.go # pkg/pool/static_pool.go # plugins/rpc/plugin.go
Diffstat (limited to 'pkg/payload/payload.go')
-rwxr-xr-xpkg/payload/payload.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/payload/payload.go b/pkg/payload/payload.go
new file mode 100755
index 00000000..fac36852
--- /dev/null
+++ b/pkg/payload/payload.go
@@ -0,0 +1,16 @@
+package payload
+
+// Payload carries binary header and body to stack and
+// back to the server.
+type Payload struct {
+ // Context represent payload context, might be omitted.
+ Context []byte
+
+ // body contains binary payload to be processed by WorkerProcess.
+ Body []byte
+}
+
+// String returns payload body as string
+func (p *Payload) String() string {
+ return string(p.Body)
+}