feat(gl): scaffold general ledger grpc service

This commit is contained in:
2026-08-14 18:52:30 +03:30
parent 1863de1f3b
commit b1e0b01598
19 changed files with 3065 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
// Package health provides the service readiness use case.
package health
import "context"
type Database interface {
Ping(context.Context) error
}
type Status struct {
Serving bool
DatabaseReady bool
}
type Service struct {
database Database
}
func NewService(database Database) *Service {
return &Service{database: database}
}
func (s *Service) Check(ctx context.Context) Status {
status := Status{Serving: true}
if s.database != nil {
status.DatabaseReady = s.database.Ping(ctx) == nil
}
return status
}