1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-17 18:06:15 -05:00
v2fly/features/policy/default.go

38 lines
691 B
Go
Raw Normal View History

2018-10-21 04:27:13 -04:00
package policy
import (
"time"
)
2018-10-22 02:42:10 -04:00
// DefaultManager is the implementation of the Manager.
2018-10-21 04:27:13 -04:00
type DefaultManager struct{}
2018-10-22 02:42:10 -04:00
// Type implements common.HasType.
2018-10-21 04:27:13 -04:00
func (DefaultManager) Type() interface{} {
return ManagerType()
}
2018-10-22 02:42:10 -04:00
// ForLevel implements Manager.
2018-10-21 04:27:13 -04:00
func (DefaultManager) ForLevel(level uint32) Session {
p := SessionDefault()
if level == 1 {
p.Timeouts.ConnectionIdle = time.Second * 600
}
return p
}
2018-10-22 02:42:10 -04:00
// ForSystem implements Manager.
2018-10-21 04:27:13 -04:00
func (DefaultManager) ForSystem() System {
return System{}
}
2018-10-22 02:42:10 -04:00
// Start implements common.Runnable.
2018-10-21 04:27:13 -04:00
func (DefaultManager) Start() error {
return nil
}
2018-10-22 02:42:10 -04:00
// Close implements common.Closable.
2018-10-21 04:27:13 -04:00
func (DefaultManager) Close() error {
return nil
}