Versions in this module Expand all Collapse all v0 v0.1.0 Nov 12, 2022 v0.0.1 Nov 10, 2022 Changes in this version + func RawSockStopper(fd int) (readableOrStop func() (bool, error), stop func(), err error) + type Env map[string]*regexp.Regexp + func (e Env) Evaluate(env map[string]string) bool + type KObjAction string + const ADD + const BIND + const CHANGE + const MOVE + const OFFLINE + const ONLINE + const REMOVE + const UNBIND + func ParseKObjAction(raw string) (a KObjAction, err error) + func (a KObjAction) String() string + type Matcher interface + Compile func() error + Evaluate func(e UEvent) bool + EvaluateAction func(a KObjAction) bool + EvaluateEnv func(e map[string]string) bool + String func() string + type Mode int + const KernelEvent + const UdevEvent + type NetlinkConn struct + Addr syscall.SockaddrNetlink + Fd int + type RuleDefinition struct + Action *string + Env map[string]string + func (r *RuleDefinition) Compile() error + func (r RuleDefinition) Evaluate(e UEvent) bool + func (r RuleDefinition) EvaluateAction(a KObjAction) (match bool) + func (r RuleDefinition) EvaluateEnv(e map[string]string) bool + func (r RuleDefinition) String() string + type RuleDefinitions struct + Rules []RuleDefinition + func (rs *RuleDefinitions) AddRule(r RuleDefinition) + func (rs *RuleDefinitions) Compile() error + func (rs RuleDefinitions) Evaluate(e UEvent) bool + func (rs RuleDefinitions) EvaluateAction(a KObjAction) (match bool) + func (rs RuleDefinitions) EvaluateEnv(e map[string]string) bool + func (rs RuleDefinitions) String() string + type UEvent struct + Action KObjAction + Env map[string]string + KObj string + func ParseUEvent(raw []byte) (e *UEvent, err error) + func (e UEvent) Bytes() []byte + func (e UEvent) Equal(e2 UEvent) (bool, error) + func (e UEvent) String() string + type UEventConn struct + func (c *UEventConn) Close() error + func (c *UEventConn) Connect(mode Mode) (err error) + func (c *UEventConn) Monitor(queue chan UEvent, errors chan error, matcher Matcher) (stop func(stopTimeout time.Duration) (ok bool)) + func (c *UEventConn) ReadMsg() (msg []byte, err error) + func (c *UEventConn) ReadUEvent() (*UEvent, error)