This repository has been archived on 2024-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
core-old/internal/bundb/checker.go
Dawid Wysokiński efbb3623ea
All checks were successful
continuous-integration/drone/push Build is passing
feat: add meta router (#83)
Reviewed-on: twhelp/core#83
2022-09-17 09:37:03 +00:00

24 lines
309 B
Go

package bundb
import (
"context"
"github.com/uptrace/bun"
)
type Checker struct {
db *bun.DB
}
func NewChecker(db *bun.DB) *Checker {
return &Checker{db: db}
}
func (c *Checker) Name() string {
return "db:ping"
}
func (c *Checker) Check(ctx context.Context) error {
return c.db.PingContext(ctx)
}