add metadata interceptors, auth client interceptors

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2022-03-11 12:33:18 +01:00
parent c0e79d8834
commit 97ced73270
11 changed files with 101 additions and 68 deletions

View File

@ -45,7 +45,7 @@ func New(opts ...Option) (Client, error) {
}
if c.opts.addr == "" {
c.addr = fmt.Sprintf("%s:///%s", c.opts.registry.String(), c.opts.name)
} else if strings.HasPrefix(c.opts.addr, "tcp://"){
} else if strings.HasPrefix(c.opts.addr, "tcp://") {
c.addr = strings.Replace(c.opts.addr, "tcp://", "", 1)
} else {
c.addr = c.opts.addr