What's Changed
- Bump google.golang.org/grpc from 1.79.2 to 1.79.3 in /transport/grpc_transport by @dependabot[bot] in #53
- Bump google.golang.org/grpc from 1.79.2 to 1.79.3 in /clients/grpc_client by @dependabot[bot] in #54
- feat: add service startup priority by @sxwebdev in #55
New
Startup priority
Services can be assigned a startup priority to control initialization order. Services with the same priority start concurrently within a group. Groups are started sequentially in ascending priority order. Priority 0 (default) services start last, concurrently, after all prioritized groups are ready.
ln.ServicesRunner().Register(
// Priority 1: DB layer — start concurrently, both must be ready before next group
launcher.NewService(
launcher.WithServiceName("postgres"),
launcher.WithStartupPriority(1),
launcher.WithService(pgService),
),
launcher.NewService(
launcher.WithServiceName("redis"),
launcher.WithStartupPriority(1),
launcher.WithService(redisService),
),
// Priority 2: message broker — waits for DB layer to be ready
launcher.NewService(
launcher.WithServiceName("rabbitmq"),
launcher.WithStartupPriority(2),
launcher.WithService(rabbitService),
),
// Priority 0 (default): application services — start concurrently after all groups
launcher.NewService(
launcher.WithServiceName("http-server"),
launcher.WithService(httpService),
),
launcher.NewService(
launcher.WithServiceName("grpc-server"),
launcher.WithService(grpcService),
),
)
// Start order: (postgres + redis) → rabbitmq → (http + grpc concurrently)synctest
Cover launcher with synctest and fixed two bugs
Full Changelog: v0.4.0...v0.5.0