mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-22 16:28:30 +02:00
refactor(config): restructured with better concurrency and error handling, reduced cross referencing
This commit is contained in:
@@ -6,7 +6,9 @@ import (
|
||||
"github.com/yusing/godoxy/agent/pkg/agent"
|
||||
"github.com/yusing/godoxy/internal/homepage"
|
||||
nettypes "github.com/yusing/godoxy/internal/net/types"
|
||||
provider "github.com/yusing/godoxy/internal/route/provider/types"
|
||||
"github.com/yusing/godoxy/internal/utils/pool"
|
||||
gperr "github.com/yusing/goutils/errs"
|
||||
"github.com/yusing/goutils/http/reverseproxy"
|
||||
"github.com/yusing/goutils/task"
|
||||
)
|
||||
@@ -55,9 +57,15 @@ type (
|
||||
Stream() nettypes.Stream
|
||||
}
|
||||
RouteProvider interface {
|
||||
Start(task.Parent) gperr.Error
|
||||
LoadRoutes() gperr.Error
|
||||
GetRoute(alias string) (r Route, ok bool)
|
||||
IterRoutes(yield func(alias string, r Route) bool)
|
||||
NumRoutes() int
|
||||
FindService(project, service string) (r Route, ok bool)
|
||||
Statistics() ProviderStats
|
||||
GetType() provider.Type
|
||||
ShortName() string
|
||||
String() string
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user