feat(gl): add standalone ledger authority mode
CI/CD Stage / stage (push) Failing after 1m12s

This commit is contained in:
2026-10-06 22:40:07 +03:30
parent 01d13dbbf2
commit 88e227f80c
26 changed files with 2033 additions and 196 deletions
+8
View File
@@ -15,6 +15,10 @@ type SettlementMonitor interface {
Stats(context.Context) (ledger.SettlementStats, error)
}
type SettlementAuthority interface {
SettlementAllowed(context.Context) (bool, error)
}
type Status struct {
Serving bool
DatabaseReady bool
@@ -50,6 +54,10 @@ func (s *Service) Check(ctx context.Context) Status {
if err == nil {
status.SettlementStats = stats
status.SettlementReady = true
if authority, ok := s.settlement.(SettlementAuthority); ok {
allowed, authorityErr := authority.SettlementAllowed(ctx)
status.SettlementReady = authorityErr == nil && allowed
}
}
}
return status