Documentation ¶
Index ¶
Constants ¶
View Source
const ( PprofStrFmt = "%s -no_browser=true -http=0.0.0.0:%d %s" Trace = "go tool trace" TraceStrFmt = "%s -http=0.0.0.0:%d %s" )
View Source
const ( Redirect = "redirect" ReadFile = "readFile" RouteDefault = RouteDefaultPre + "/%s/" RouteDefaultPre = "/dat" RouteTrace = RouteTracePre + "/%s/" RouteTracePre = "/eat" )
Variables ¶
View Source
var ( Pprof = "go tool pprof" // pprof LifeTime int64 = 60 * 30 // 30 min TimerCheck = 60 RunEnv string )
Functions ¶
func IsFileExist ¶
func SetStorageDir ¶
Types ¶
type Proxy ¶
type Proxy struct { Port int PortLock sync.Mutex CmdOut bytes.Buffer CmdErr bytes.Buffer Cmd *exec.Cmd // contains filtered or unexported fields }
func (*Proxy) GetCanUsePort ¶
func (*Proxy) UpdateUseTime ¶
func (p *Proxy) UpdateUseTime()
type ProxyUseCase ¶
type ProxyUseCase struct {
// contains filtered or unexported fields
}
var Puc *ProxyUseCase
func NewProxyUseCase ¶
func NewProxyUseCase() *ProxyUseCase
func (*ProxyUseCase) CloseAll ¶
func (puc *ProxyUseCase) CloseAll()
func (*ProxyUseCase) GetPortByDir ¶
func (puc *ProxyUseCase) GetPortByDir(string2 string) (port int, err error)
func (*ProxyUseCase) GetProxy ¶
func (puc *ProxyUseCase) GetProxy(dir string) *Proxy
func (*ProxyUseCase) Remove ¶
func (puc *ProxyUseCase) Remove(dir string)
func (*ProxyUseCase) Timer ¶
func (puc *ProxyUseCase) Timer()
Click to show internal directories.
Click to hide internal directories.