add codec NewMessage helper
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
c9049c3845
commit
71d82e9d5b
@ -54,3 +54,7 @@ type Message struct {
|
||||
Header metadata.Metadata
|
||||
Body []byte
|
||||
}
|
||||
|
||||
func NewMessage(t MessageType) *Message {
|
||||
return &Message{Type: t, Header: metadata.New(0)}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user