1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-11-18 01:23:13 -05:00

refactor dependency resolution

This commit is contained in:
Darien Raymond
2018-10-21 10:27:13 +02:00
parent d9cdfffc69
commit a5dcb0f13e
36 changed files with 356 additions and 730 deletions

View File

@@ -3,6 +3,7 @@ package routing
import (
"context"
"v2ray.com/core/common"
"v2ray.com/core/features"
)
@@ -18,3 +19,21 @@ type Router interface {
func RouterType() interface{} {
return (*Router)(nil)
}
type DefaultRouter struct{}
func (DefaultRouter) Type() interface{} {
return RouterType()
}
func (DefaultRouter) PickRoute(ctx context.Context) (string, error) {
return "", common.ErrNoClue
}
func (DefaultRouter) Start() error {
return nil
}
func (DefaultRouter) Close() error {
return nil
}