diff --git a/internal/route/route.go b/internal/route/route.go index 7f295f3..9d6b4d6 100644 --- a/internal/route/route.go +++ b/internal/route/route.go @@ -69,6 +69,8 @@ type ( impl routes.Route isValidated bool lastError gperr.Error + + started chan struct{} } Routes map[string]*Route ) @@ -218,6 +220,7 @@ func (r *Route) Validate() gperr.Error { r.impl = impl r.Excluded = r.ShouldExclude() + r.started = make(chan struct{}) return nil } @@ -244,8 +247,10 @@ func (r *Route) Finish(reason any) { r.impl = nil } -func (r *Route) Started() bool { - return r.impl != nil +func (r *Route) Started() <-chan struct{} { + return r.started +} + } func (r *Route) ProviderName() string { diff --git a/internal/route/routes/route.go b/internal/route/routes/route.go index b87b4d2..6f10455 100644 --- a/internal/route/routes/route.go +++ b/internal/route/routes/route.go @@ -27,7 +27,7 @@ type ( HealthMonitor() health.HealthMonitor References() []string - Started() bool + Started() <-chan struct{} IdlewatcherConfig() *idlewatcher.Config HealthCheckConfig() *health.HealthCheckConfig