pf-dtm

command module
v1.17.0-tls Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Fork 元との差分、及び、意図

gRPC で https が使えない

Dial 時のオプションが http ( HTTP/1.1 ) 用に固定されているため https ( HTTP/2 ) を始めとする TLS 通信だと利用できない

元コードの該当箇所 ( 23.05.18 時点 )

inOpt := grpc.WithChainUnaryInterceptor(interceptors...)
conn, rerr := grpc.Dial(grpcServer, inOpt, grpc.WithTransportCredentials(insecure.NewCredentials()), opts)

そのため、dtmconn パッケージに Dial 関数を実装した内部的には環境変数 GRPC_INSECURE で切り替えられるようにした上で、以下のように修正した

inOpt := grpc.WithChainUnaryInterceptor(interceptors...)
conn, rerr := dtmconn.Dial(grpcServer, inOpt, opts)

なお、セキュリティ上、デフォルトは https としている

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址