Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedWatcherType = errors.New("unsupported watcher type") ErrMismatchedNlMsgType = errors.New("mismatched netlink message type") )
View Source
var ( LinkWatcher = newWatcher[LinkEvent] RuleWatcher = newWatcher[RuleEvent] ChainWatcher = newWatcher[ChainEvent] SetWatcher = newWatcher[SetEvent] SetElementWatcher = newWatcher[SetElementEvent] TableWatcher = newWatcher[TableEvent] NftWatcher = newWatcher[NftEvent] )
Functions ¶
This section is empty.
Types ¶
type ChainEvent ¶
func (ChainEvent) ActionInfo ¶
func (c ChainEvent) ActionInfo() string
type NftEventFace ¶
type NftEventFace interface {
ActionInfo() string
// contains filtered or unexported methods
}
type RuleEvent ¶
func (RuleEvent) ActionInfo ¶
type SetElementEvent ¶
func (SetElementEvent) ActionInfo ¶
func (t SetElementEvent) ActionInfo() string
type SetEvent ¶
func (SetEvent) ActionInfo ¶
type TableEvent ¶
func (TableEvent) ActionInfo ¶
func (t TableEvent) ActionInfo() string
type Watcher ¶
type Watcher[T watcherT] interface {
Close() error
Stream(ctx context.Context) <-chan WatcherEvent[T]
}
Watcher is an interface for a watcher that can stream events of type T. T is a type that implements the watcherT interface, which can be either Link or Rule.
type WatcherEvent ¶
type WatcherEvent[T watcherT] struct {
Evt T
Err error
}
Click to show internal directories.
Click to hide internal directories.