Documentation ¶
Index ¶
- Variables
- func GetClientTLSConfig(hostname string, caFile string, certFile string, keyFile string) (*tls.Config, error)
- func GetHost(addr string) (string, error)
- func GetServerTLSConfig(caFile string, certFile string, keyFile string) (*tls.Config, error)
- func NewBreaker() *circuit.Breaker
- type StoppableListener
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetClientTLSConfig ¶
func GetClientTLSConfig(hostname string, caFile string, certFile string, keyFile string) (*tls.Config, error)
GetClientTLSConfig returns client TLS config.
func GetHost ¶
GetHost return sthe host component from the specified address.
func GetServerTLSConfig ¶
GetServerTLSConfig returns the server TLS config.
Types ¶
type StoppableListener ¶
type StoppableListener struct {
// contains filtered or unexported fields
}
StoppableListener is a type of TCP listener that can be stopped by signalling the associated stopc channel. It binds to all IPs resolved from the specified address.
func NewStoppableListener ¶
func NewStoppableListener(addr string, tlsConfig *tls.Config, stopc <-chan struct{}) (*StoppableListener, error)
NewStoppableListener returns a listener that can be stopped.
func (*StoppableListener) Accept ¶
func (ln *StoppableListener) Accept() (net.Conn, error)
Accept starts to accept incoming connections.
func (*StoppableListener) Addr ¶
func (ln *StoppableListener) Addr() net.Addr
Addr returns the net.Addr of the listener.
func (*StoppableListener) Close ¶
func (ln *StoppableListener) Close() error
Close closes the listener.
Directories ¶
Path | Synopsis |
---|---|
cenk
|
|
backoff
Package backoff implements backoff algorithms for retrying operations.
|
Package backoff implements backoff algorithms for retrying operations. |
facebookgo
|
|
rubyist
|
|
circuitbreaker
Package circuit implements the Circuit Breaker pattern.
|
Package circuit implements the Circuit Breaker pattern. |
Click to show internal directories.
Click to hide internal directories.