Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(parent context.Context, addr string, timeout time.Duration, sets ...DialOption) (*grpc.ClientConn, context.CancelFunc, error)
Types ¶
type DialOption ¶
type DialOption func(opts *DialOptions)
func AddStdGRPCOptions ¶
func AddStdGRPCOptions(std ...grpc.DialOption) DialOption
func Fingerprint ¶
func Fingerprint(in string) DialOption
func PlainText ¶
func PlainText() DialOption
func SkipTLSVerify ¶
func SkipTLSVerify() DialOption
type DialOptions ¶
type DialOptions struct { // if true then disabled TLS PlainText bool // skips certificate verification SkipTLSVerify bool // if set then checks fingerprint the server cert Fingerprint string // standart grpc opts GRPCOptions []grpc.DialOption }
type ManualVerifyPeerCertificate ¶
type ManualVerifyPeerCertificate struct { DNSName string SkipTLSVerify bool // checker of fingerprint from server cert Fingerprint SHA1Fingerprint // contains filtered or unexported fields }
func NewManualVerifyPeerCertificate ¶
func NewManualVerifyPeerCertificate(tlsSkip bool, fingerprint, dnsName string) *ManualVerifyPeerCertificate
func (ManualVerifyPeerCertificate) VerifyPeerCertificateOption ¶
func (v ManualVerifyPeerCertificate) VerifyPeerCertificateOption(ctx context.Context, cancel context.CancelFunc) func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
type SHA1Fingerprint ¶
type SHA1Fingerprint string
func (SHA1Fingerprint) Empty ¶
func (s SHA1Fingerprint) Empty() bool
func (SHA1Fingerprint) Match ¶
func (s SHA1Fingerprint) Match(in []byte) bool
Click to show internal directories.
Click to hide internal directories.