github.com/sagernet/sing-tun@v0.3.0-beta.5/packages.go (about) 1 package tun 2 3 import E "github.com/sagernet/sing/common/exceptions" 4 5 type PackageManager interface { 6 Start() error 7 Close() error 8 IDByPackage(packageName string) (uint32, bool) 9 IDBySharedPackage(sharedPackage string) (uint32, bool) 10 PackageByID(id uint32) (string, bool) 11 SharedPackageByID(id uint32) (string, bool) 12 } 13 14 type PackageManagerCallback interface { 15 OnPackagesUpdated(packages int, sharedUsers int) 16 E.Handler 17 }