mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-26 19:31:46 +01:00
refactor(entrypoint): propagate errors from route registration and stream serving
Changed AddRoute and ListenAndServe methods to return errors instead of logging them internally and continuing. This allows callers to properly handle and propagate errors, improving error visibility and enabling better error management across the codebase. Updated all callers in fileserver, reverse_proxy, stream routes to handle these errors appropriately.
This commit is contained in:
@@ -10,7 +10,7 @@ type Entrypoint interface {
|
||||
DisablePoolsLog(v bool)
|
||||
|
||||
GetRoute(alias string) (types.Route, bool)
|
||||
AddRoute(r types.Route)
|
||||
AddRoute(r types.Route) error
|
||||
IterRoutes(yield func(r types.Route) bool)
|
||||
NumRoutes() int
|
||||
RoutesByProvider() map[string][]types.Route
|
||||
|
||||
Reference in New Issue
Block a user