feat(ws): release generic WebSocket client and server v0.31.0-preview
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
omni "git.yuntuo.hk/k2safe/go-omni"
|
||||
"git.yuntuo.hk/k2safe/go-omni/contract"
|
||||
@@ -66,5 +67,11 @@ func NewApp(deps *svc.ServiceContext) (*omni.App, error) {
|
||||
}
|
||||
app.GET(cfg.Endpoints.Readiness.Path, deps.Health.ReadinessHandler(options...))
|
||||
}
|
||||
// Optional project-owned extension; no generated file needs hand edits.
|
||||
if extension, ok := any(deps).(interface{ RegisterCustomRoutes(*omni.App) error }); ok {
|
||||
if err := extension.RegisterCustomRoutes(app); err != nil {
|
||||
return nil, errors.Join(err, app.Close())
|
||||
}
|
||||
}
|
||||
return app, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user