util

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: Apache-2.0 Imports: 16 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