github.com/metacubex/sing-tun@v0.2.7-0.20240512075008-89e7c6208eec/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 }