func (d *PipelineMessage) SetExtra(extra interface{}) {
	d.extra = extra
}
SetExtra sets the extra section for the message, if there is any.
package protocol
import (
	"bytes"
	"encoding/binary"
	"fmt"
)
const PipelineMessageHeaderSize uint32 = 3
const (
	MagicPipelineReq MagicCode = 0xE6
	MagicPipelineRes MagicCode = 0xE7
)
type PipelineMessageHeader struct {
	Op         OpCode      
	ExtraLen   uint8       
	StatusCode StatusCode  
}
type PipelineMessage struct {
	Header
	PipelineMessageHeader
	extra interface{}
	value []byte
	buf   *bytes.Buffer
}
func NewPipelineMessage(opcode OpCode) *PipelineMessage {
	return &PipelineMessage{
		Header: Header{
			Magic:   MagicPipelineReq,
			Version: Version1,
		},
		PipelineMessageHeader: PipelineMessageHeader{
			Op: opcode,
		},
	}
}
func NewPipelineMessageFromRequest(buf *bytes.Buffer) *PipelineMessage {
	return &PipelineMessage{
		Header: Header{
			Magic:         MagicPipelineReq,
			Version:       Version1,
			MessageLength: uint32(buf.Len()),
		},
		PipelineMessageHeader: PipelineMessageHeader{},
		buf:                   buf,
	}
}
func (d *PipelineMessage) Response(buf *bytes.Buffer) EncodeDecoder {
	msg := &PipelineMessage{
		Header: Header{
			Magic:   MagicPipelineRes,
			Version: Version1,
		},
		PipelineMessageHeader: PipelineMessageHeader{
			Op: d.Op,
		},
		buf: d.buf,
	}
	if buf != nil {
		msg.buf = buf
	} else {
		d.buf.Reset()
		msg.buf = d.buf
	}
	msg.MessageLength = uint32(d.buf.Len())
	return msg
}
func (d *PipelineMessage) SetStatus(code StatusCode) {
	d.StatusCode = code
}
func (d *PipelineMessage) Status() StatusCode {
	return d.StatusCode
}
func (d *PipelineMessage) SetValue(value []byte) {
	d.value = value
}
func (d *PipelineMessage) Value() []byte {
	return d.value
}
func (d *PipelineMessage) OpCode() OpCode {
	return d.Op
}
func (d *PipelineMessage) SetBuffer(buf *bytes.Buffer) {
	d.buf = buf
}
func (d *PipelineMessage) Buffer() *bytes.Buffer {
	return d.buf
}