Method
Build
(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions)
Source from the content-addressed store, hash-verified
| 31 | type passthroughBuilder struct{} |
| 32 | |
| 33 | func (*passthroughBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { |
| 34 | if target.Endpoint() == "" && opts.Dialer == nil { |
| 35 | return nil, errors.New("passthrough: received empty target in Build()") |
| 36 | } |
| 37 | r := &passthroughResolver{ |
| 38 | target: target, |
| 39 | cc: cc, |
| 40 | } |
| 41 | r.start() |
| 42 | return r, nil |
| 43 | } |
| 44 | |
| 45 | func (*passthroughBuilder) Scheme() string { |
| 46 | return scheme |
Callers
nothing calls this directly
Tested by
no test coverage detected