plugin

package
v0.0.0-...-1be2e0f Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2016 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	SinceLast   time.Duration
	LastSuccess time.Time
	Offline     bool
	Running     bool
}

type Plugin

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

func Create

func Create(
	version *version.Version,
	state *State,
	using string,
	plugins []string,
	call func() bool,
	every time.Duration,
) *Plugin

func (*Plugin) GetCall

func (self *Plugin) GetCall() func() bool

func (*Plugin) GetEvery

func (self *Plugin) GetEvery() time.Duration

func (*Plugin) GetInfo

func (self *Plugin) GetInfo() *Info

func (*Plugin) GetLastSuccess

func (self *Plugin) GetLastSuccess() time.Time

func (*Plugin) GetPlugins

func (self *Plugin) GetPlugins() []string

func (*Plugin) GetSinceLast

func (self *Plugin) GetSinceLast() time.Duration

func (*Plugin) GetState

func (self *Plugin) GetState() *State

func (*Plugin) GetUsing

func (self *Plugin) GetUsing() string

func (*Plugin) GetVersion

func (self *Plugin) GetVersion() *version.Version

func (*Plugin) IsOffline

func (self *Plugin) IsOffline() bool

func (*Plugin) IsRunning

func (self *Plugin) IsRunning() bool

func (*Plugin) Start

func (self *Plugin) Start()

type State

type State struct {
	// unsafe
	Addr       string
	HTTPClient *http.Client
	// KeyValue can be set with the flag -plugin-kv
	KeyValue map[string]interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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