| 1 | package outboundscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/ |
| 2 | |
| 3 | import ( |
| 4 | "contextscip-go gomod github.com/golang/go/src go1.15 context/" |
| 5 | |
| 6 | "v2ray.com/core/commonscip-go gomod v2ray.com/core . `v2ray.com/core/common`/" |
| 7 | "v2ray.com/core/featuresscip-go gomod v2ray.com/core . `v2ray.com/core/features`/" |
| 8 | "v2ray.com/core/transportscip-go gomod v2ray.com/core . `v2ray.com/core/transport`/" |
| 9 | ) |
| 10 | |
| 11 | // Handler is the interface for handlers that process outbound connections. |
| 12 | // |
| 13 | // v2ray:api:stable |
| 14 | type Handlerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Handler# interface { |
| 15 | commonscip-go gomod v2ray.com/core . `v2ray.com/core/common`/.Runnablescip-go gomod v2ray.com/core . `v2ray.com/core/common`/Runnable# |
| 16 | Tagscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Handler#Tag.() string |
| 17 | Dispatchscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Handler#Dispatch.(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, link *transportscip-go gomod v2ray.com/core . `v2ray.com/core/transport`/.Linkscip-go gomod v2ray.com/core . `v2ray.com/core/transport`/Link#) |
| 18 | } |
| 19 | |
| 20 | type HandlerSelectorscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/HandlerSelector# interface { |
| 21 | Selectscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/HandlerSelector#Select.([]string) []string |
| 22 | } |
| 23 | |
| 24 | // Manager is a feature that manages outbound.Handlers. |
| 25 | // |
| 26 | // v2ray:api:stable |
| 27 | type Managerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Manager# interface { |
| 28 | featuresscip-go gomod v2ray.com/core . `v2ray.com/core/features`/.Featurescip-go gomod v2ray.com/core . `v2ray.com/core/features`/Feature# |
| 29 | // GetHandler returns an outbound.Handler for the given tag. |
| 30 | GetHandlerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Manager#GetHandler.(tag string) Handlerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Handler# |
| 31 | // GetDefaultHandler returns the default outbound.Handler. It is usually the first outbound.Handler specified in the configuration. |
| 32 | GetDefaultHandlerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Manager#GetDefaultHandler.() Handlerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Handler# |
| 33 | // AddHandler adds a handler into this outbound.Manager. |
| 34 | AddHandlerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Manager#AddHandler.(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, handler Handlerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Handler#) error |
| 35 | |
| 36 | // RemoveHandler removes a handler from outbound.Manager. |
| 37 | RemoveHandlerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Manager#RemoveHandler.(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, tag string) error |
| 38 | } |
| 39 | |
| 40 | // ManagerType returns the type of Manager interface. Can be used to implement common.HasType. |
| 41 | // |
| 42 | // v2ray:api:stable |
| 43 | func ManagerTypescip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/ManagerType().() interface{} { |
| 44 | return (*Managerscip-go gomod v2ray.com/core . `v2ray.com/core/features/outbound`/Manager#)(nil) |
| 45 | } |