Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(conf *ClientConfig) (*Client, error)
func (*Client) Run ¶
func (cli *Client) Run(handler ClientHandler) error
Run starts communicating with server, do reconnecting and requests dispatching logic.
type ClientConfig ¶
type ClientConn ¶
type ClientHandler ¶
type ClientHandler interface { HandlePingResponse(req *msgpb.PingResponse) HandleNewTunnelRequest(req *msgpb.NewTunnelRequest) *msgpb.NewTunnelResponse HandleCloseTunnelRequest(req *msgpb.CloseTunnelRequest) *msgpb.CloseTunnelResponse HandleShutdownRequest(req *msgpb.ShutdownRequest) bool HandleUnknownMessage(m interface{}) HandleError(err error) }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(conf *ServerConfig) (*Server, error)
func (*Server) Clients ¶
func (s *Server) Clients() <-chan *ClientConn
type ServerConfig ¶
type ServerConfig struct { ListenAddr string Timeout util.TimeoutConfig TLSConf *tls.Config ValidateFunc ValidateFunc }
type ValidateFunc ¶
Click to show internal directories.
Click to hide internal directories.