plugin

package
v0.0.0-...-987fb27 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stop

func Stop()

Stop default plugins

Types

type Config

type Config struct {
	Name       string         `yaml:"name" json:"name"`
	ScriptFile string         `yaml:"script_file" json:"script_file"`
	Interval   types.Duration `yaml:"interval" json:"interval"`
}

type Configs

type Configs struct {
	Plugins []Config `yaml:"plugins" json:"plugins"`
}

type Option

type Option func(*Plugins)

func ConfigFile

func ConfigFile(file string) Option

ConfigFile set config file

func TrellisConfig

func TrellisConfig(config config.Config) Option

TrellisConfig set config repo

type Plugin

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

func (*Plugin) Start

func (p *Plugin) Start() error

func (*Plugin) Stop

func (p *Plugin) Stop()

type Plugins

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

func NewPlugins

func NewPlugins(opts ...Option) *Plugins

func (*Plugins) ParseFlags

func (p *Plugins) ParseFlags(set *flag.FlagSet)

func (*Plugins) Start

func (p *Plugins) Start() error

func (*Plugins) Stop

func (p *Plugins) Stop()

type Repo

type Repo interface {
	Start() error
	Stop()
}

func NewPlugin

func NewPlugin(config Config) (Repo, error)

Jump to

Keyboard shortcuts

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