client: allow to set metadata for message

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-12-16 15:03:42 +03:00
parent a36f99e30b
commit e143e2b547
5 changed files with 21 additions and 3 deletions

View File

@@ -139,6 +139,10 @@ func (n *noopMessage) ContentType() string {
return n.opts.ContentType
}
func (n *noopMessage) Metadata() metadata.Metadata {
return n.opts.Metadata
}
func (n *noopClient) newCodec(contentType string) (codec.Codec, error) {
if cf, ok := n.opts.Codecs[contentType]; ok {
return cf, nil