mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-24 17:41:29 +00:00
29 lines
650 B
Go
29 lines
650 B
Go
package adapter
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/sagernet/sing-box/log"
|
|
"github.com/sagernet/sing-box/option"
|
|
)
|
|
|
|
type Endpoint interface {
|
|
Lifecycle
|
|
Type() string
|
|
Tag() string
|
|
Outbound
|
|
}
|
|
|
|
type EndpointRegistry interface {
|
|
option.EndpointOptionsRegistry
|
|
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, endpointType string, options any) (Endpoint, error)
|
|
}
|
|
|
|
type EndpointManager interface {
|
|
Lifecycle
|
|
Endpoints() []Endpoint
|
|
Get(tag string) (Endpoint, bool)
|
|
Remove(tag string) error
|
|
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, endpointType string, options any) error
|
|
}
|