agentutils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseHTTPClient

func CloseHTTPClient(client *http.Client)

关闭客户端连接

func Executable

func Executable() string

find executable file

Types

type CommandHelp

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

命令帮助

func NewCommandHelp

func NewCommandHelp() *CommandHelp

func (*CommandHelp) Append

func (this *CommandHelp) Append(appendString string) *CommandHelp

附加内容

func (*CommandHelp) Option

func (this *CommandHelp) Option(code string, description string) *CommandHelp

选项

func (*CommandHelp) Print

func (this *CommandHelp) Print()

打印

func (*CommandHelp) Product

func (this *CommandHelp) Product(product string) *CommandHelp

产品

func (*CommandHelp) Usage

func (this *CommandHelp) Usage(usage string) *CommandHelp

使用方法

func (*CommandHelp) Version

func (this *CommandHelp) Version(version string) *CommandHelp

版本

type CommandHelpOption

type CommandHelpOption struct {
	Code        string
	Description string
}

type FileBuffer

type FileBuffer struct {
	MaxLines int
	// contains filtered or unexported fields
}

文件缓冲

func NewFileBuffer

func NewFileBuffer(path string) *FileBuffer

创建新文件缓冲

func (*FileBuffer) Close

func (this *FileBuffer) Close()

关闭

func (*FileBuffer) Debug

func (this *FileBuffer) Debug()

是否开启调试模式

func (*FileBuffer) Next

func (this *FileBuffer) Next() bool

是否有更多数据

func (*FileBuffer) Read

func (this *FileBuffer) Read(f func(data []byte))

读取数据

func (*FileBuffer) Write

func (this *FileBuffer) Write(data []byte) error

写入数据

type ServiceManager

type ServiceManager struct {
	Name        string
	Description string
	// contains filtered or unexported fields
}

服务管理器

func NewServiceManager

func NewServiceManager(name, description string) *ServiceManager

获取对象

func (*ServiceManager) Close

func (this *ServiceManager) Close() error

关闭

func (*ServiceManager) Install

func (this *ServiceManager) Install(exePath string, args []string) error

安装服务

func (*ServiceManager) Log

func (this *ServiceManager) Log(msg string)

记录普通日志

func (*ServiceManager) LogError

func (this *ServiceManager) LogError(msg string)

记录错误日志

func (*ServiceManager) PauseWindow

func (this *ServiceManager) PauseWindow()

保持命令行窗口是打开的

func (*ServiceManager) Run

func (this *ServiceManager) Run()

运行

func (*ServiceManager) Start

func (this *ServiceManager) Start() error

启动服务

func (*ServiceManager) Uninstall

func (this *ServiceManager) Uninstall() error

删除服务

Jump to

Keyboard shortcuts

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