github.com/apernet/sing-tun@v0.2.6-0.20240323130332-b9f6511036ad/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 }