support metadata option

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-07-09 11:00:19 +03:00
parent fade40754a
commit 59d6c26003
4 changed files with 18 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import (
"net/http"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/metadata"
)
var (
@@ -96,3 +97,9 @@ type structTagsKey struct{}
func StructTags(tags []string) client.CallOption {
return client.SetCallOption(structTagsKey{}, tags)
}
type metadataKey struct{}
func Metadata(md metadata.Metadata) client.CallOption {
return client.SetCallOption(metadataKey{}, md)
}