tls

package
v2.0.143 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 11

Documentation

Index

Constants

View Source
const Type = "tls"

Variables

This section is empty.

Functions

func Dial

func Dial(a address, name string, i *identity.TokenId, timeout time.Duration, proxyConf *transport.ProxyConfiguration, protocols ...string) (transport.Conn, error)

func DialWithLocalBinding

func DialWithLocalBinding(a address, name, localBinding string, i *identity.TokenId, timeout time.Duration, proxyConf *transport.ProxyConfiguration, protocols ...string) (transport.Conn, error)

func Listen

func Listen(bindAddress, name string, i *identity.TokenId, acceptF func(transport.Conn), protocols ...string) (io.Closer, error)

func ListenTLS added in v2.0.95

func ListenTLS(bindAddress, name string, config *tls.Config) (net.Listener, error)

ListenTLS returns net.Listener that is attached to shared listener with protocols (ALPN) specified by config.NextProtos It can be used in http.Server or other standard components

func SetSharedListenerHandshakeTimeout added in v2.0.121

func SetSharedListenerHandshakeTimeout(timeout time.Duration)

func SetSharedListenerRateLimiter added in v2.0.127

func SetSharedListenerRateLimiter(limiter rate.AdaptiveRateLimitTracker)

Types

type AddressParser

type AddressParser struct{}

func (AddressParser) Parse

func (ap AddressParser) Parse(s string) (transport.Address, error)

type Connection

type Connection struct {
	*tls.Conn
	// contains filtered or unexported fields
}

func NewConnection added in v2.0.72

func NewConnection(detail *transport.ConnectionDetail, conn *tls.Conn) *Connection

func (*Connection) Detail

func (self *Connection) Detail() *transport.ConnectionDetail

func (*Connection) PeerCertificates

func (self *Connection) PeerCertificates() []*x509.Certificate

func (*Connection) Protocol added in v2.0.95

func (self *Connection) Protocol() string

Jump to

Keyboard shortcuts

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