mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-13 14:44:15 +00:00
generalized event handler
This commit is contained in:
16 files changed
+80
-32
No files matched your search
@@ -37,6 +37,7 @@ func global() policy.Policy {
|
||||
}
|
||||
}
|
||||
|
||||
// GetPolicy implements policy.Manager.
|
||||
func (m *Instance) GetPolicy(level uint32) policy.Policy {
|
||||
if p, ok := m.levels[level]; ok {
|
||||
return *p
|
||||
@@ -44,13 +45,16 @@ func (m *Instance) GetPolicy(level uint32) policy.Policy {
|
||||
return global()
|
||||
}
|
||||
|
||||
// Start implements app.Application.Start().
|
||||
func (m *Instance) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close implements app.Application.Close().
|
||||
func (m *Instance) Close() {
|
||||
}
|
||||
|
||||
// Interface implement app.Application.Interface().
|
||||
func (m *Instance) Interface() interface{} {
|
||||
return (*policy.Manager)(nil)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user