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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user