dvnet

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFatal   = 0
	LogError   = 1
	LogWarning = 2
	LogInfo    = 3
	LogDetail  = 4
	LogDebug   = 5
	LogTrace   = 6
)
View Source
const (
	KindTcpForward   = 1
	KindDbConnection = 2
)

Variables

View Source
var AveragePersistentOptions = map[string]interface{}{
	"repeats": 50,
	"pause":   5,
}
View Source
var KeepAliveNetPool = float64(keepAliveDefault)
View Source
var Log = LogError
View Source
var NetPool = make(map[string][]*NetPoolItem)

Functions

func CloseNetConn

func CloseNetConn(conn *net.Conn)

func CloseNetConnPoolForId

func CloseNetConnPoolForId(id string)

func CloseNetPoolItem

func CloseNetPoolItem(item *NetPoolItem)

func CloseNetPoolItemAtIndex

func CloseNetPoolItemAtIndex(id string, index int)

func Forward

func Forward(host string, targetHost string)

func ForwardClose

func ForwardClose(id string)

func GetAveragePersistentOptions

func GetAveragePersistentOptions() map[string]interface{}

func GetForwardId

func GetForwardId(host string, targetHost string) (string, string, string)

func GetIntegerOption

func GetIntegerOption(options map[string]interface{}, name string, defValue int) int

func InitBySettings

func InitBySettings(parameters map[string]string, functionPool map[string]interface{})

func LoadStruct

func LoadStruct(method string, url string, body string, headers map[string]string, v interface{}, options map[string]interface{}) error

func LoadStructFormUrlEncoded

func LoadStructFormUrlEncoded(method string, url string, body interface{}, headers map[string]string, v interface{}, options map[string]interface{}) error

func NewJsonRequest

func NewJsonRequest(method string, url string, body string, headers map[string]string, options map[string]interface{}) ([]byte, error)

func NewRequest

func NewRequest(method string, url string, body string, headers map[string]string, options map[string]interface{}) ([]byte, error)

func StopAllForwarding

func StopAllForwarding()

func StopForwardingByHostTarget

func StopForwardingByHostTarget(host string, target string)

func UpdatePropertiesThruNetRequest

func UpdatePropertiesThruNetRequest(request string) error

func UrlEncodedPart

func UrlEncodedPart(data interface{}) string

func ValidateHostTargetForPortForwarding

func ValidateHostTargetForPortForwarding(host string, target string) bool

Types

type NetPoolItem

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

func PlaceToNetPool

func PlaceToNetPool(id string, client *net.Conn, target *net.Conn, kind int) *NetPoolItem

Jump to

Keyboard shortcuts

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