func NewMessage(data interface{}, svcInfo *serviceinfo.ServiceInfo, ri rpcinfo.RPCInfo, msgType MessageType, rpcRole RPCRole) Message {
	msg := messagePool.Get().(*message)
	msg.data = data
	msg.rpcInfo = ri
	msg.svcInfo = svcInfo
	msg.msgType = msgType
	msg.rpcRole = rpcRole
	msg.transInfo = transInfoPool.Get().(*transInfo)
	return msg
}
NewMessage creates a new Message using the given info.
package remote
import (
	"sync"
	"github.com/cloudwego/kitex/pkg/rpcinfo"
	"github.com/cloudwego/kitex/pkg/serviceinfo"
	"github.com/cloudwego/kitex/transport"
)
var (
	messagePool      sync.Pool
	transInfoPool    sync.Pool
	emptyServiceInfo serviceinfo.ServiceInfo
)
func init() {
	messagePool.New = newMessage
	transInfoPool.New = newTransInfo
}
type MessageType int32
const (
	InvalidMessageType MessageType = 0
	Call               MessageType = 1
	Reply              MessageType = 2
	Exception          MessageType = 3
	Oneway MessageType = 4
	Stream MessageType = 5
)
const (
	ReadFailed string = "RFailed"
	MeshHeader string = "mHeader"
)
var emptyProtocolInfo ProtocolInfo
type ProtocolInfo struct {
	TransProto transport.Protocol
	CodecType  serviceinfo.PayloadCodec
}
func NewProtocolInfo(tp transport.Protocol, ct serviceinfo.PayloadCodec) ProtocolInfo {
	return ProtocolInfo{
		TransProto: tp,
		CodecType:  ct,
	}
}
type Message interface {
	RPCInfo() rpcinfo.RPCInfo
	ServiceInfo() *serviceinfo.ServiceInfo
	Data() interface{}
	NewData(method string) (ok bool)
	MessageType() MessageType
	SetMessageType(MessageType)
	RPCRole() RPCRole
	PayloadLen() int
	SetPayloadLen(size int)
	TransInfo() TransInfo
	Tags() map[string]interface{}
	ProtocolInfo() ProtocolInfo
	SetProtocolInfo(ProtocolInfo)
	PayloadCodec() PayloadCodec
	SetPayloadCodec(pc PayloadCodec)
	Recycle()
}