mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-11-11 19:32:58 -08:00
refactor dependency resolution
This commit is contained in:
36 files changed
+356
-730
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package policy
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type DefaultManager struct{}
|
||||
|
||||
func (DefaultManager) Type() interface{} {
|
||||
return ManagerType()
|
||||
}
|
||||
|
||||
func (DefaultManager) ForLevel(level uint32) Session {
|
||||
p := SessionDefault()
|
||||
if level == 1 {
|
||||
p.Timeouts.ConnectionIdle = time.Second * 600
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
func (DefaultManager) ForSystem() System {
|
||||
return System{}
|
||||
}
|
||||
|
||||
func (DefaultManager) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (DefaultManager) Close() error {
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user