config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	NeedsRetitle NeedsRetitle `json:"needs_retitle"`
}

Configuration is the top-level serialization target for plugin Configuration.

func (*Configuration) Validate

func (c *Configuration) Validate() error

type NeedsRetitle

type NeedsRetitle struct {
	Regexp       string `json:"regexp"`
	ErrorMessage string `json:"error_message"`
}

type PluginConfigAgent

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

ConfigAgent contains the agent mutex and the Agent configuration.

func NewPluginConfigAgent

func NewPluginConfigAgent() *PluginConfigAgent

func (*PluginConfigAgent) GetPlugin

func (pca *PluginConfigAgent) GetPlugin() *plugin.Plugin

GetPlugin returns the plugin

func (*PluginConfigAgent) Load

func (pca *PluginConfigAgent) Load(path string) error

Load attempts to load config from the path. It returns an error if either the file can't be read or the configuration is invalid.

func (*PluginConfigAgent) Set

func (pca *PluginConfigAgent) Set(pc *Configuration)

Set sets the plugin agent configuration.

func (*PluginConfigAgent) Start

func (pca *PluginConfigAgent) Start(path string) error

Start starts polling path for plugin config. If the first attempt fails, then start returns the error. Future errors will halt updates but not stop.

Jump to

Keyboard shortcuts

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