Documentation ¶
Index ¶
- Constants
- func DetectTLS(r io.Reader) (bool, []byte, error)
- func New(tc credentials.TransportCredentials) credentials.TransportCredentials
- func NewWithDynamicOption(tc credentials.TransportCredentials, do DynamicOption) credentials.TransportCredentials
- func NewWrappedConn(conn net.Conn, peeked []byte) net.Conn
- type DynamicOption
- type DynamicOptionFunc
- type WrappedConn
Constants ¶
View Source
const TLSPeekedBytes = 6
Variables ¶
This section is empty.
Functions ¶
func DetectTLS ¶
DetectTLS reads necessary number of bytes from io.Reader returns result, bytes read from Reader and error No matter if error happens or what flag value is returned bytes should be checked
func New ¶
func New(tc credentials.TransportCredentials) credentials.TransportCredentials
func NewWithDynamicOption ¶
func NewWithDynamicOption(tc credentials.TransportCredentials, do DynamicOption) credentials.TransportCredentials
Types ¶
type DynamicOption ¶
type DynamicOption interface {
IsActive() bool
}
DynamicOption controls optional TLS in runtime. It can be used to turn on/off the feature based on some condition For example, an atomic boolean flag
type DynamicOptionFunc ¶
type DynamicOptionFunc func() bool
func (DynamicOptionFunc) IsActive ¶
func (f DynamicOptionFunc) IsActive() bool
type WrappedConn ¶
WrappedConn Imitates MSG_PEEK behaviour Unlike net.Conn is not thread-safe
Click to show internal directories.
Click to hide internal directories.