add path option support for grpc

This commit is contained in:
ginuerzh
2022-07-27 18:01:22 +08:00
parent d7b56871a9
commit 818463260f
5 changed files with 84 additions and 6 deletions

View File

@ -8,16 +8,19 @@ import (
type metadata struct {
insecure bool
host string
path string
}
func (d *grpcDialer) parseMetadata(md mdata.Metadata) (err error) {
const (
insecure = "grpcInsecure"
host = "host"
path = "path"
)
d.md.insecure = mdx.GetBool(md, insecure)
d.md.host = mdx.GetString(md, host)
d.md.path = mdx.GetString(md, path)
return
}