github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/common/environment/base.go (about) 1 package environment 2 3 import ( 4 "github.com/v2fly/v2ray-core/v5/common/environment/filesystemcap" 5 "github.com/v2fly/v2ray-core/v5/features/extension/storage" 6 "github.com/v2fly/v2ray-core/v5/transport/internet" 7 "github.com/v2fly/v2ray-core/v5/transport/internet/tagged" 8 ) 9 10 type BaseEnvironmentCapabilitySet interface { 11 FeaturesLookupCapabilitySet 12 LogCapabilitySet 13 } 14 15 type BaseEnvironment interface { 16 BaseEnvironmentCapabilitySet 17 doNotImpl() 18 } 19 20 type SystemNetworkCapabilitySet interface { 21 Dialer() internet.SystemDialer 22 Listener() internet.SystemListener 23 } 24 25 type InstanceNetworkCapabilitySet interface { 26 OutboundDialer() tagged.DialFunc 27 } 28 29 type FeaturesLookupCapabilitySet interface { 30 RequireFeatures() interface{} 31 } 32 33 type LogCapabilitySet interface { 34 RecordLog() interface{} 35 } 36 37 type FileSystemCapabilitySet interface { 38 filesystemcap.FileSystemCapabilitySet 39 } 40 41 type PersistentStorageCapabilitySet interface { 42 PersistentStorage() storage.ScopedPersistentStorage 43 } 44 type TransientStorageCapabilitySet interface { 45 TransientStorage() storage.ScopedTransientStorage 46 }