coremain

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenConfig

func GenConfig(p string) error

GenConfig generates a config template to path p.

func Run

func Run(c string)

Run starts mosdns, it blocks.

Types

type Config

type Config struct {
	Log struct {
		Level string `yaml:"level"`
		File  string `yaml:"file"`
	} `yaml:"log"`
	Plugin  []*handler.Config `yaml:"plugin"`
	Include []string          `yaml:"include"`
}

Config is config

func GetTemplateConfig

func GetTemplateConfig() (*Config, error)

func (*Config) AddPlugin

func (c *Config) AddPlugin(tag, typ string, args interface{}) error

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