client

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseVisitor added in v0.14.0

type BaseVisitor struct {
	log.Logger
	// contains filtered or unexported fields
}

type ByProxyStatusResp added in v0.15.0

type ByProxyStatusResp []ProxyStatusResp

func (ByProxyStatusResp) Len added in v0.15.0

func (a ByProxyStatusResp) Len() int

func (ByProxyStatusResp) Less added in v0.15.0

func (a ByProxyStatusResp) Less(i, j int) bool

func (ByProxyStatusResp) Swap added in v0.15.0

func (a ByProxyStatusResp) Swap(i, j int)

type Control

type Control struct {
	log.Logger
	// contains filtered or unexported fields
}

func NewControl

func NewControl(runId string, conn frpNet.Conn, session *fmux.Session, pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf) *Control

func (*Control) Close added in v0.13.0

func (ctl *Control) Close() error

func (*Control) ClosedDoneCh added in v0.22.0

func (ctl *Control) ClosedDoneCh() <-chan struct{}

ClosedDoneCh returns a channel which will be closed after all resources are released

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(inMsg *msg.ReqWorkConn)

func (*Control) ReloadConf added in v0.22.0

func (ctl *Control) ReloadConf(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf) error

func (*Control) Run

func (ctl *Control) Run()

type GeneralResponse added in v0.13.0

type GeneralResponse struct {
	Code int64  `json:"code"`
	Msg  string `json:"msg"`
}

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.ProxyStatus) ProxyStatusResp

type ReloadResp added in v0.13.0

type ReloadResp struct {
	GeneralResponse
}

api/reload

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf) (svr *Service)

func (*Service) Close added in v0.13.0

func (svr *Service) Close()

func (*Service) GetController added in v0.22.0

func (svr *Service) GetController() *Control

func (*Service) ReloadConf added in v0.22.0

func (svr *Service) ReloadConf(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf) error

func (*Service) Run

func (svr *Service) Run() error

func (*Service) RunAdminServer added in v0.13.0

func (svr *Service) RunAdminServer(addr string, port int) (err error)

type StatusResp added in v0.15.0

type StatusResp struct {
	Tcp   []ProxyStatusResp `json:"tcp"`
	Udp   []ProxyStatusResp `json:"udp"`
	Http  []ProxyStatusResp `json:"http"`
	Https []ProxyStatusResp `json:"https"`
	Stcp  []ProxyStatusResp `json:"stcp"`
	Xtcp  []ProxyStatusResp `json:"xtcp"`
}

type StcpVisitor added in v0.14.0

type StcpVisitor struct {
	BaseVisitor
	// contains filtered or unexported fields
}

func (*StcpVisitor) Close added in v0.14.0

func (sv *StcpVisitor) Close()

func (*StcpVisitor) Run added in v0.14.0

func (sv *StcpVisitor) Run() (err error)

type Visitor added in v0.14.0

type Visitor interface {
	Run() error
	Close()
	log.Logger
}

Visitor is used for forward traffics from local port tot remote service.

func NewVisitor added in v0.14.0

func NewVisitor(ctl *Control, cfg config.VisitorConf) (visitor Visitor)

type VisitorManager added in v0.22.0

type VisitorManager struct {
	// contains filtered or unexported fields
}

func NewVisitorManager added in v0.22.0

func NewVisitorManager(ctl *Control) *VisitorManager

func (*VisitorManager) Close added in v0.22.0

func (vm *VisitorManager) Close()

func (*VisitorManager) Reload added in v0.22.0

func (vm *VisitorManager) Reload(cfgs map[string]config.VisitorConf)

func (*VisitorManager) Run added in v0.22.0

func (vm *VisitorManager) Run()

type XtcpVisitor added in v0.14.0

type XtcpVisitor struct {
	BaseVisitor
	// contains filtered or unexported fields
}

func (*XtcpVisitor) Close added in v0.14.0

func (sv *XtcpVisitor) Close()

func (*XtcpVisitor) Run added in v0.14.0

func (sv *XtcpVisitor) Run() (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL