refactor: code refactor and improved context and error handling

This commit is contained in:
yusing
2025-05-24 10:02:24 +08:00
parent 1f1ae38e4d
commit 5b7c392297
31 changed files with 116 additions and 98 deletions

View File

@@ -73,13 +73,13 @@ var dummyHealthCheckConfig = &health.HealthCheckConfig{
}
var (
causeReload = gperr.New("reloaded")
causeContainerDestroy = gperr.New("container destroyed")
causeReload = gperr.New("reloaded") //nolint:errname
causeContainerDestroy = gperr.New("container destroyed") //nolint:errname
)
const reqTimeout = 3 * time.Second
// TODO: fix stream type
// TODO: fix stream type.
func NewWatcher(parent task.Parent, r routes.Route) (*Watcher, error) {
cfg := r.IdlewatcherConfig()
key := cfg.Key()