Init initializes common connection options. It MUST be called prior to any other package functions.
(vp *viper.Viper)
| 101 | // Init initializes common connection options. It MUST be called prior to any |
| 102 | // other package functions. |
| 103 | func Init(vp *viper.Viper) error { |
| 104 | for _, fn := range GRPCOptionFuncs { |
| 105 | dialOpt, err := fn(vp) |
| 106 | if err != nil { |
| 107 | return err |
| 108 | } |
| 109 | grpcDialOptions = append(grpcDialOptions, dialOpt) |
| 110 | } |
| 111 | return nil |
| 112 | } |
| 113 | |
| 114 | // New creates a new gRPC client connection to the target. |
| 115 | func New(target string) (*grpc.ClientConn, error) { |
no test coverage detected
searching dependent graphs…