config

package
v0.0.0-...-f524348 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	Address   string `hcl:"address,optional"`
	PluginDir string `hcl:"plugin_dir,optional"`
}

func (*AgentConfig) Validate

func (c *AgentConfig) Validate() error

type NautilusConfig

type NautilusConfig struct {
	Agent    *AgentConfig    `hcl:"agent,block"`
	Plugins  []*PluginConfig `hcl:"plugin,block"`
	LogLevel string          `hcl:"log_level,optional"`
}

func NewDefault

func NewDefault() *NautilusConfig

func ParseConfig

func ParseConfig(path string) (*NautilusConfig, error)

func (*NautilusConfig) GetPluginConfig

func (cfg *NautilusConfig) GetPluginConfig(name string) *PluginConfig

func (*NautilusConfig) GetPluginConfigMap

func (cfg *NautilusConfig) GetPluginConfigMap(name string) (map[string]interface{}, error)

func (*NautilusConfig) Validate

func (c *NautilusConfig) Validate() error

type PluginConfig

type PluginConfig struct {
	Name    string           `hcl:"name,label"`
	Enabled bool             `hcl:"enabled,optional"`
	Config  PluginConfigBody `hcl:"config,block"`
}

type PluginConfigBody

type PluginConfigBody struct {
	Body hcl.Body `hcl:",remain"`
}

Jump to

Keyboard shortcuts

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