remove transport draft, add grpc web and gateway support

This commit is contained in:
2021-09-18 01:39:15 +02:00
parent 4085420f6f
commit 1eea54f18a
37 changed files with 2884 additions and 290 deletions

View File

@ -33,6 +33,9 @@ func New(opts ...Option) (Client, error) {
if c.opts.tlsConfig != nil {
c.opts.dialOptions = append(c.opts.dialOptions, grpc.WithTransportCredentials(credentials.NewTLS(c.opts.tlsConfig)))
}
if !c.opts.secure {
c.opts.dialOptions = append(c.opts.dialOptions, grpc.WithInsecure())
}
c.addr = fmt.Sprintf("%s:///%s", c.opts.registry.String(), c.opts.name)
if c.opts.version != "" {
c.addr = c.addr + ":" + strings.TrimSpace(c.opts.version)