cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Run

func Run()

Run 开始执行监控日志

Types

type IMonitor

type IMonitor interface {
	Do()
	WaitAndMonitor()
}

IMonitor 监控

type Monitor

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

Monitor 监控的实例

func (*Monitor) AddSvr

func (m *Monitor) AddSvr(svrName, key string, config tail.Config) *tail.Tail

AddSvr 新增服务的文件监听

func (*Monitor) Cancel

func (m *Monitor) Cancel()

Cancel 关闭所有的文件监听

func (*Monitor) Do

func (m *Monitor) Do()

Do 执行监控

func (*Monitor) Remove

func (m *Monitor) Remove(svrName string)

Remove 移除服务的文件监听

func (*Monitor) Transform

func (m *Monitor) Transform(svrName string, line *tail.Line)

func (*Monitor) WaitAndMonitor

func (m *Monitor) WaitAndMonitor()

WaitAndMonitor 等待并监控目录变化

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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