2026-02-11 16:56:17: merge [main:afeadb1d9a241da30507f3683781558dbccfefc6];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
This commit is contained in:
1 parent
aecc42c6d8
commit
d4091f8805
25 files changed
+1664
-92
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"isp-router-service/assembly"
|
||||
"isp-router-service/conf"
|
||||
|
||||
"github.com/txix-open/isp-kit/bootstrap"
|
||||
"github.com/txix-open/isp-kit/cluster"
|
||||
"github.com/txix-open/isp-kit/shutdown"
|
||||
)
|
||||
|
||||
var (
|
||||
version = "1.0.0"
|
||||
)
|
||||
|
||||
func main() {
|
||||
boot := bootstrap.New(version, conf.Remote{}, nil, cluster.HttpTransport)
|
||||
app := boot.App
|
||||
logger := app.Logger()
|
||||
|
||||
assembly := assembly.New(boot)
|
||||
app.AddRunners(assembly.Runners()...)
|
||||
app.AddClosers(assembly.Closers()...)
|
||||
|
||||
shutdown.On(func() {
|
||||
logger.Info(app.Context(), "starting shutdown")
|
||||
app.Shutdown()
|
||||
logger.Info(app.Context(), "shutdown completed")
|
||||
})
|
||||
|
||||
err := app.Run()
|
||||
if err != nil {
|
||||
boot.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user