config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NfqueueCfg

type NfqueueCfg struct {
	LocalNets   []string
	PluginDirs  []string
	PluginFiles []string
	QIDs        []int
	Policy      string
	OnError     string
	TickSeconds int
}

NfqueueCfg defines the configuration of nfqueue manager

func (*NfqueueCfg) BindViper

func (cfg *NfqueueCfg) BindViper(v *viper.Viper, prefix string)

BindViper setups posix flags for commandline configuration and bind to viper

func (NfqueueCfg) Dump

func (cfg NfqueueCfg) Dump() string

Dump configuration

func (NfqueueCfg) Empty

func (cfg NfqueueCfg) Empty() bool

Empty returns true if configuration is empty

func (*NfqueueCfg) FromViper

func (cfg *NfqueueCfg) FromViper(v *viper.Viper, prefix string)

FromViper fill values from viper

func (*NfqueueCfg) SetPFlags

func (cfg *NfqueueCfg) SetPFlags(short bool, prefix string)

SetPFlags setups posix flags for commandline configuration

func (NfqueueCfg) Validate

func (cfg NfqueueCfg) Validate() error

Validate checks that configuration is ok

Jump to

Keyboard shortcuts

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