Documentation ¶
Index ¶
- func ForwardPortIfNeeded(vmIp string, vmPort int, typ consts.NatForwardType) (hostPort int, alreadyMapped bool, err error)
- func GetUsedPortByKeyword(keyword string, defaultVal int) (port int, err error)
- func GetUsedPortByPs(keyword string, defaultVal int) (port int, err error)
- func GetValidPort() (hostPort int, err error)
- func GetWindowsUsedPortByKeyword(keyword string, defaultVal int) (port int, err error)
- func NginxUsedPort(hostPort int) bool
- func NginxUsedPortByTyp(hostPort int, typ consts.NatForwardType) bool
- func RemoveForward(vmIp string, vmPort int, typ consts.NatForwardType) (err error)
- func RemoveForwardByPort(vmPort int, typ consts.NatForwardType) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForwardPortIfNeeded ¶
func GetUsedPortByKeyword ¶
find port by keyword
func GetUsedPortByPs ¶
find port by ps command
func GetValidPort ¶
func NginxUsedPort ¶
func NginxUsedPortByTyp ¶
func NginxUsedPortByTyp(hostPort int, typ consts.NatForwardType) bool
func RemoveForward ¶
func RemoveForward(vmIp string, vmPort int, typ consts.NatForwardType) (err error)
func RemoveForwardByPort ¶
func RemoveForwardByPort(vmPort int, typ consts.NatForwardType) (err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.