Documentation
¶
Index ¶
- type TLSTransport
- func (t *TLSTransport) DialTimeout(addr string, timeout time.Duration) (net.Conn, error)
- func (t *TLSTransport) FinalAdvertiseAddr(ip string, port int) (net.IP, int, error)
- func (t *TLSTransport) GetAutoBindPort() int
- func (t *TLSTransport) PacketCh() <-chan *memberlist.Packet
- func (t *TLSTransport) Shutdown() error
- func (t *TLSTransport) StreamCh() <-chan net.Conn
- func (t *TLSTransport) WriteTo(b []byte, addr string) (time.Time, error)
- type TLSTransportConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TLSTransport ¶
type TLSTransport struct {
// contains filtered or unexported fields
}
TLSTransport is a Transport implementation that uses connectionless UDP for packet operations, and ad-hoc TCP connections for stream operations.
func NewTLSTransport ¶
func NewTLSTransport(config *TLSTransportConfig, reg prometheus.Registerer) (*TLSTransport, error)
NewTLSTransport returns a net transport with the given configuration. On success all the network listeners will be created and listening.
func (*TLSTransport) DialTimeout ¶
See Transport.
func (*TLSTransport) FinalAdvertiseAddr ¶
See Transport.
func (*TLSTransport) GetAutoBindPort ¶
func (t *TLSTransport) GetAutoBindPort() int
GetAutoBindPort returns the bind port that was automatically given by the kernel, if a bind port of 0 was given.
func (*TLSTransport) PacketCh ¶
func (t *TLSTransport) PacketCh() <-chan *memberlist.Packet
See Transport.
type TLSTransportConfig ¶
type TLSTransportConfig struct {
// BindAddrs is a list of addresses to bind to for both TCP and UDP
// communications.
BindAddrs []string
// BindPort is the port to listen on, for each address above.
BindPort int
// Logger is a logger for operator messages.
Logger *log.Logger
TLS *tls.Config
}
TLSTransportConfig is used to configure a net transport.
Click to show internal directories.
Click to hide internal directories.