mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
API doc
This commit is contained in:
@@ -10,6 +10,8 @@ import (
|
||||
|
||||
// Dispatcher is a feature that dispatches inbound requests to outbound handlers based on rules.
|
||||
// Dispatcher is required to be registered in a V2Ray instance to make V2Ray function properly.
|
||||
//
|
||||
// v2ray:api:stable
|
||||
type Dispatcher interface {
|
||||
features.Feature
|
||||
|
||||
@@ -18,6 +20,8 @@ type Dispatcher interface {
|
||||
}
|
||||
|
||||
// DispatcherType returns the type of Dispatcher interface. Can be used to implement common.HasType.
|
||||
//
|
||||
// v2ray:api:stable
|
||||
func DispatcherType() interface{} {
|
||||
return (*Dispatcher)(nil)
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
)
|
||||
|
||||
// Router is a feature to choose an outbound tag for the given request.
|
||||
//
|
||||
// v2ray:api:stable
|
||||
type Router interface {
|
||||
features.Feature
|
||||
|
||||
@@ -16,6 +18,8 @@ type Router interface {
|
||||
}
|
||||
|
||||
// RouterType return the type of Router interface. Can be used to implement common.HasType.
|
||||
//
|
||||
// v2ray:api:stable
|
||||
func RouterType() interface{} {
|
||||
return (*Router)(nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user