config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPlugin added in v0.10.0

func AddPlugin(pluginGroup *[]*handler.Config, tag, typ string, args interface{}) error

func GenConfig

func GenConfig(p string) error

GenConfig generates a config template to path p.

Types

type Config

type Config struct {
	Log struct {
		Level string `yaml:"level"`
		File  string `yaml:"file"`
	} `yaml:"log"`

	Server struct {
		Bind       []string `yaml:"bind"`
		MaxUDPSize int      `yaml:"max_udp_size"`
	} `yaml:"server"`

	Plugin struct {
		Entry      []string          `yaml:"entry"`
		Router     []*handler.Config `yaml:"router"`
		Matcher    []*handler.Config `yaml:"matcher"`
		Functional []*handler.Config `yaml:"functional"`
	}
}

Config is config

func GetTemplateConfig

func GetTemplateConfig() (*Config, error)

func LoadConfig

func LoadConfig(p string) (*Config, error)

LoadConfig loads a yaml config from path p.

func (*Config) Save

func (c *Config) Save(p string) error

Jump to

Keyboard shortcuts

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