probes

package
v0.0.0-...-17a5fe9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Probe

type Probe struct {
	Name      string // App名称
	Site      string // App官方站点
	DocSite   string // App文档站点
	Developer string // App开发者
	Author    string // 探测器作者
}

探测器基本定义

type ProcessProbe

type ProcessProbe struct {
	Probe

	CommandName     string   // 命令名
	CommandPatterns []string // 命令行匹配模式

	// 获取版本号信息的命令
	// 支持以下变量:
	// - ${commandFile} 命令行文件路径
	// - ${commandDir} 命令行文件所在目录
	CommandVersion string
	// contains filtered or unexported fields
}

func NewProcessProbe

func NewProcessProbe() *ProcessProbe

func (*ProcessProbe) OnParseVersion

func (this *ProcessProbe) OnParseVersion(parser func(versionString string) (string, error))

func (*ProcessProbe) OnProcess

func (this *ProcessProbe) OnProcess(validator func(process *apps.Process) bool)

func (*ProcessProbe) Run

func (this *ProcessProbe) Run() (resultApps []*apps.App, err error)

Jump to

Keyboard shortcuts

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