plugins

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Plugins              = make(map[string]*Plugin)
	PluginsWithScheduler = make(map[string]*PluginScheduler)
)

Functions

func AddNewPlugins

func AddNewPlugins(newPlugins map[string]*Plugin)

func ClearAllPlugins

func ClearAllPlugins()

func DelNoUsePlugins

func DelNoUsePlugins(newPlugins map[string]*Plugin)

func Detect

func Detect()

func ListPlugins

func ListPlugins(dir string) map[string]*Plugin

key: 60_ntp.py

func PluginRun

func PluginRun(plugin *Plugin)

Types

type Plugin

type Plugin struct {
	FilePath string
	MTime    int64
	Cycle    int
}

type PluginScheduler

type PluginScheduler struct {
	Ticker *time.Ticker
	Plugin *Plugin
	Quit   chan struct{}
}

func NewPluginScheduler

func NewPluginScheduler(p *Plugin) *PluginScheduler

func (*PluginScheduler) Schedule

func (this *PluginScheduler) Schedule()

func (*PluginScheduler) Stop

func (this *PluginScheduler) Stop()

Jump to

Keyboard shortcuts

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