plugins

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Jar

type Jar map[string]Plugin

Jar is a collection of plugins

type JobRunner added in v0.4.0

type JobRunner interface {
	// PluginByName returns plugin constructor
	PluginByName(pluginName string) (p PluginFactory, err error)

	// RunJob starts job in separate goroutine.
	//
	// Use ctx.Error channel to track job result and ctx.Cancel() to cancel it.
	RunJob(j manifest.Job, ctx *job.RunContext)
}

JobRunner is the the interface that represents a current job caller.

type Plugin

type Plugin interface {
	// Call calls a plugin
	Call(*job.RunContext, JobRunner) error

	// Cancel stops plugin execution
	Cancel(*job.RunContext) error
}

Plugin represents Gilbert's plugin

type PluginFactory

type PluginFactory func(*scope.Scope, manifest.RawParams, log.Logger) (Plugin, error)

PluginFactory is plugin constructor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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