Documentation
¶
Overview ¶
Package config provides generic configuration structures for the plugin system This deliberately avoids copying any Hockeypuck-specific configuration patterns to maintain AGPL license compliance
Index ¶
Constants ¶
const ( DefaultPluginDirectory = "/etc/hockeypuck/plugins" DefaultDataDir = "/var/lib/hockeypuck" )
Constants for plugin system defaults only
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalPluginConfig ¶
type GlobalPluginConfig struct {
EventBufferSize int `toml:"eventBufferSize"`
MaxConcurrentEvents int `toml:"maxConcurrentEvents"`
LogLevel string `toml:"logLevel"`
MetricsEnabled bool `toml:"metricsEnabled"`
TaskTimeoutStr string `toml:"taskTimeout"`
}
GlobalPluginConfig contains global plugin settings
func (*GlobalPluginConfig) TaskTimeout ¶
func (g *GlobalPluginConfig) TaskTimeout() time.Duration
TaskTimeout returns the task timeout as a duration
type PluginConfig ¶
type PluginConfig struct {
Enabled bool `toml:"enabled"`
Directory string `toml:"directory"`
LoadOrder []string `toml:"loadOrder"`
Global GlobalPluginConfig `toml:"global"`
Config map[string]map[string]interface{} `toml:"config"`
}
PluginConfig configures the plugin system only
type Settings ¶
type Settings struct {
// Generic server information
DataDir string
// Plugin-specific configuration
Plugins PluginConfig
}
Settings represents the minimal plugin system configuration This is deliberately generic to avoid AGPL license issues
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns default plugin configuration
func NewFromGeneric ¶
NewFromGeneric creates Settings from a generic configuration map This allows Hockeypuck to pass its config without us knowing the structure
func (*Settings) GetPluginConfig ¶
GetPluginConfig returns configuration for a specific plugin