Documentation ¶ Index ¶ type Config type Rule func (r *Rule) String() string type RuleType type Rules func Init(file io.Reader) (Rules, error) func (rs Rules) Match(network string, srcAddr, dstAddr net.Addr) (*Rule, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Config ¶ type Config struct { Version int `yaml:"version"` Rules Rules `yaml:"rules"` } type Rule ¶ type Rule struct { Match string `yaml:"match"` Type string `yaml:"type"` Target string `yaml:"target,omitempty"` Name string `yaml:"name,omitempty"` // contains filtered or unexported fields } func (*Rule) String ¶ func (r *Rule) String() string type RuleType ¶ type RuleType int const ( UserConnHandler RuleType = iota Drop ) type Rules ¶ type Rules []*Rule func Init ¶ added in v1.0.1 func Init(file io.Reader) (Rules, error) func (Rules) Match ¶ func (rs Rules) Match(network string, srcAddr, dstAddr net.Addr) (*Rule, error) Source Files ¶ View all Source files rules.go Click to show internal directories. Click to hide internal directories.