util

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth(username, passwd string) string

func GetProxyStatus

func GetProxyStatus(statusAddr string, user string, passwd string, name string) (status *client.ProxyStatusResp, err error)

func ReloadConf

func ReloadConf(reloadAddr string, user string, passwd string) error

func SendHTTPMsg

func SendHTTPMsg(method, urlStr string, host string, headers map[string]string, proxy string) (code int, body string, header http.Header, err error)

func SendTCPMsg

func SendTCPMsg(addr string, msg string) (res string, err error)

func SendTCPMsgByConn

func SendTCPMsgByConn(c net.Conn, msg string) (res string, err error)

func SendUDPMsg

func SendUDPMsg(addr string, msg string) (res string, err error)

Types

type Process

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

func NewProcess

func NewProcess(path string, params []string) *Process

func (*Process) ErrorOutput

func (p *Process) ErrorOutput() string

func (*Process) SetBeforeStopHandler

func (p *Process) SetBeforeStopHandler(fn func())

func (*Process) Start

func (p *Process) Start() error

func (*Process) Stop

func (p *Process) Stop() error

Jump to

Keyboard shortcuts

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