mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-10 02:53:12 +00:00
23 lines
519 B
Go
23 lines
519 B
Go
package route
|
|
|
|
import "github.com/sagernet/sing/common/x/list"
|
|
|
|
type (
|
|
NetworkUpdateCallback = func() error
|
|
DefaultInterfaceUpdateCallback = func()
|
|
)
|
|
|
|
type NetworkUpdateMonitor interface {
|
|
Start() error
|
|
Close() error
|
|
RegisterCallback(callback NetworkUpdateCallback) *list.Element[NetworkUpdateCallback]
|
|
UnregisterCallback(element *list.Element[NetworkUpdateCallback])
|
|
}
|
|
|
|
type DefaultInterfaceMonitor interface {
|
|
Start() error
|
|
Close() error
|
|
DefaultInterfaceName() string
|
|
DefaultInterfaceIndex() int
|
|
}
|