mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-25 19:45:38 -05:00
move stats and inbound to features directory
This commit is contained in:
31
features/inbound/inbound.go
Normal file
31
features/inbound/inbound.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package inbound
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"v2ray.com/core/common"
|
||||
"v2ray.com/core/common/net"
|
||||
"v2ray.com/core/features"
|
||||
)
|
||||
|
||||
// Handler is the interface for handlers that process inbound connections.
|
||||
type Handler interface {
|
||||
common.Runnable
|
||||
// The tag of this handler.
|
||||
Tag() string
|
||||
|
||||
// Deprecated. Do not use in new code.
|
||||
GetRandomInboundProxy() (interface{}, net.Port, int)
|
||||
}
|
||||
|
||||
// Manager is a feature that manages InboundHandlers.
|
||||
type Manager interface {
|
||||
features.Feature
|
||||
// GetHandlers returns an InboundHandler for the given tag.
|
||||
GetHandler(ctx context.Context, tag string) (Handler, error)
|
||||
// AddHandler adds the given handler into this InboundHandlerManager.
|
||||
AddHandler(ctx context.Context, handler Handler) error
|
||||
|
||||
// RemoveHandler removes a handler from InboundHandlerManager.
|
||||
RemoveHandler(ctx context.Context, tag string) error
|
||||
}
|
||||
Reference in New Issue
Block a user