Documentation ¶
Index ¶
- type ConnectionManager
- type Control
- func (ctl *Control) Close() error
- func (ctl *Control) ClosedDoneCh() <-chan struct{}
- func (ctl *Control) GracefulClose(d time.Duration) error
- func (ctl *Control) HandleNatHoleResp(inMsg *msg.NatHoleResp)
- func (ctl *Control) HandleNewProxyResp(inMsg *msg.NewProxyResp)
- func (ctl *Control) HandleReqWorkConn(_ *msg.ReqWorkConn)
- func (ctl *Control) ReloadConf(pxyCfgs []v1.ProxyConfigurer, visitorCfgs []v1.VisitorConfigurer) error
- func (ctl *Control) Run()
- type GeneralResponse
- type ProxyStatusResp
- type Service
- func (svr *Service) Close()
- func (svr *Service) GetController() *Control
- func (svr *Service) GracefulClose(d time.Duration)
- func (svr *Service) ReloadConf(pxyCfgs []v1.ProxyConfigurer, visitorCfgs []v1.VisitorConfigurer) error
- func (svr *Service) Run(ctx context.Context) error
- func (svr *Service) RunAdminServer(address string) (err error)
- type StatusResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionManager ¶ added in v0.52.4
type ConnectionManager struct {
// contains filtered or unexported fields
}
func NewConnectionManager ¶ added in v0.52.4
func NewConnectionManager(ctx context.Context, cfg *v1.ClientCommonConfig) *ConnectionManager
func (*ConnectionManager) Close ¶ added in v0.52.4
func (cm *ConnectionManager) Close() error
func (*ConnectionManager) Connect ¶ added in v0.52.4
func (cm *ConnectionManager) Connect() (net.Conn, error)
func (*ConnectionManager) OpenConnection ¶ added in v0.52.4
func (cm *ConnectionManager) OpenConnection() error
type Control ¶
type Control struct {
// contains filtered or unexported fields
}
func NewControl ¶
func NewControl( ctx context.Context, runID string, conn net.Conn, cm *ConnectionManager, clientCfg *v1.ClientCommonConfig, pxyCfgs []v1.ProxyConfigurer, visitorCfgs []v1.VisitorConfigurer, authSetter auth.Setter, ) *Control
func (*Control) ClosedDoneCh ¶ added in v0.22.0
func (ctl *Control) ClosedDoneCh() <-chan struct{}
ClosedDoneCh returns a channel that will be closed after all resources are released
func (*Control) GracefulClose ¶ added in v0.52.4
func (*Control) HandleNatHoleResp ¶ added in v0.52.4
func (ctl *Control) HandleNatHoleResp(inMsg *msg.NatHoleResp)
func (*Control) HandleNewProxyResp ¶ added in v0.15.0
func (ctl *Control) HandleNewProxyResp(inMsg *msg.NewProxyResp)
func (*Control) HandleReqWorkConn ¶ added in v0.15.0
func (ctl *Control) HandleReqWorkConn(_ *msg.ReqWorkConn)
func (*Control) ReloadConf ¶ added in v0.22.0
func (ctl *Control) ReloadConf(pxyCfgs []v1.ProxyConfigurer, visitorCfgs []v1.VisitorConfigurer) error
type GeneralResponse ¶ added in v0.13.0
type ProxyStatusResp ¶ added in v0.15.0
type ProxyStatusResp struct { Name string `json:"name"` Type string `json:"type"` Status string `json:"status"` Err string `json:"err"` LocalAddr string `json:"local_addr"` Plugin string `json:"plugin"` RemoteAddr string `json:"remote_addr"` }
func NewProxyStatusResp ¶ added in v0.15.0
func NewProxyStatusResp(status *proxy.WorkingStatus, serverAddr string) ProxyStatusResp
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a client service.
func NewService ¶
func NewService( cfg *v1.ClientCommonConfig, pxyCfgs []v1.ProxyConfigurer, visitorCfgs []v1.VisitorConfigurer, cfgFile string, ) (svr *Service, err error)
func (*Service) GetController ¶ added in v0.22.0
func (*Service) GracefulClose ¶ added in v0.52.4
func (*Service) ReloadConf ¶ added in v0.22.0
func (svr *Service) ReloadConf(pxyCfgs []v1.ProxyConfigurer, visitorCfgs []v1.VisitorConfigurer) error
func (*Service) RunAdminServer ¶ added in v0.13.0
type StatusResp ¶ added in v0.15.0
type StatusResp map[string][]ProxyStatusResp
Click to show internal directories.
Click to hide internal directories.