logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 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 Config

type Config struct {
	Speakers       []string `toml:"speakers"`
	IgnoreMessages []string `toml:"ignore_messages"`
}

Config contains the configuration of the plugin Speakers list of SpeakerNames the handler is added. All if empty IgnoreMessages a list of message types to be ignored

type Logger

type Logger struct {
	Config
	Plugin soundtouch.PluginFunc
	// contains filtered or unexported fields
}

Logger describes the plugin. It has a Config to store the configuration Plugin the plugin function suspended indicates that the plugin is temporarely suspended

func NewLogger

func NewLogger(config Config) (d *Logger)

NewLogger creates a new Logger plugin with the configuration

func (*Logger) Description

func (d *Logger) Description() string

Description returns a string explaining the purpose of this plugin

func (*Logger) Disable

func (d *Logger) Disable()

Disable temporarely the execution of the plugin

func (*Logger) Enable

func (d *Logger) Enable()

Enable temporarely the execution of the plugin

func (*Logger) Execute

func (d *Logger) Execute(pluginName string, update soundtouch.Update, speaker soundtouch.Speaker)

Execute runs the plugin with the given parameter

func (*Logger) IsEnabled

func (d *Logger) IsEnabled() bool

IsEnabled returns true if the plugin is not suspened

func (*Logger) Name

func (d *Logger) Name() string

Name returns the plugin name

func (*Logger) SampleConfig

func (d *Logger) SampleConfig() string

SampleConfig returns text explaining how plugin should be configured

func (*Logger) Terminate

func (d *Logger) Terminate() bool

Terminate indicates that no further plugin will be executed on this speaker

Jump to

Keyboard shortcuts

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