mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-10-20 16:24:25 +00:00
27 lines
574 B
Go
27 lines
574 B
Go
package adapter
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/sagernet/sing-box/log"
|
|
"github.com/sagernet/sing-box/option"
|
|
)
|
|
|
|
type Service interface {
|
|
Lifecycle
|
|
Type() string
|
|
Tag() string
|
|
}
|
|
|
|
type ServiceRegistry interface {
|
|
option.ServiceOptionsRegistry
|
|
Create(ctx context.Context, logger log.ContextLogger, tag string, serviceType string, options any) (Service, error)
|
|
}
|
|
|
|
type ServiceManager interface {
|
|
Lifecycle
|
|
Services() []Service
|
|
Get(tag string) (Service, bool)
|
|
Create(ctx context.Context, logger log.ContextLogger, tag string, serviceType string, options any) error
|
|
}
|