initial commit
This commit is contained in:
commit
88c14b627e
224 files changed
+17204
No files matched your search
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,23 @@
|
||||
package health
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"lincodex/backend/internal/port/outbound"
|
||||
)
|
||||
|
||||
type Readiness struct {
|
||||
checker outbound.ReadinessChecker
|
||||
}
|
||||
|
||||
func NewReadiness(checker outbound.ReadinessChecker) *Readiness {
|
||||
return &Readiness{checker: checker}
|
||||
}
|
||||
|
||||
func (readiness *Readiness) Check(ctx context.Context) error {
|
||||
if err := readiness.checker.Check(ctx); err != nil {
|
||||
return fmt.Errorf("readiness check failed: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Reference in new issue
Block a user