Documentation
¶
Index ¶
- func ContextWithServerName(ctx context.Context, name string) context.Context
- func GetServerNameFromContext(ctx context.Context) (string, bool)
- func HandleConnections(c1, c2 io.ReadWriteCloser) error
- func HandleListener(l net.Listener, h func(net.Conn)) error
- func RunNetServer(ctx context.Context, s NetServer, l net.Listener) error
- func SafeCloseConn(c io.ReadWriteCloser)
- type NetDialer
- type NetDialerFunc
- type NetServer
- type SSHDialer
- type SSHDialerFunc
- type SocketHandler
- type TLSServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithServerName ¶
func HandleConnections ¶ added in v0.0.3
func HandleConnections(c1, c2 io.ReadWriteCloser) error
func SafeCloseConn ¶ added in v0.0.3
func SafeCloseConn(c io.ReadWriteCloser)
Types ¶
type NetDialer ¶
type NetDialer interface {
DialContext(ctx context.Context, network, addr string) (net.Conn, error)
}
func ListenDialer ¶
func SocketsDialer ¶
func SocketsDialer(h SocketHandler) NetDialer
type NetDialerFunc ¶
func (NetDialerFunc) DialContext ¶
type NetServer ¶
type NetServer interface { Serve(l net.Listener) error ListenAndServe() error Shutdown(ctx context.Context) error }
func WrapTLSServer ¶
type SSHDialer ¶
type SSHDialer interface {
DialContext(ctx context.Context, network, addr string, config *gossh.ClientConfig) (*gossh.Client, error)
}
func NetSSHDialer ¶
type SSHDialerFunc ¶
type SSHDialerFunc func(ctx context.Context, network, addr string, config *gossh.ClientConfig) (*gossh.Client, error)
func (SSHDialerFunc) DialContext ¶
func (f SSHDialerFunc) DialContext(ctx context.Context, network, addr string, config *gossh.ClientConfig) (*gossh.Client, error)
type SocketHandler ¶
Click to show internal directories.
Click to hide internal directories.