getting closer
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-11-28 05:09:23 +01:00
parent 75442d261d
commit 5fc22c36b0
7 changed files with 31 additions and 25 deletions

View File

@@ -31,18 +31,21 @@ type Database struct {
}
func New(lc fx.Lifecycle, params DatabaseParams) (*Database, error) {
s.log.Info().Msg("Database instantiated")
s := new(Database)
s.params = params
s.log = params.Logger.Get()
s.log.Info().Msg("Database instantiated")
lc.Append(fx.Hook{
OnStart: func(ctx context.Context) error {
s.log.Info().Msg("Database OnStart Hook")
// FIXME connect to db
return nil
},
OnStop: func(ctx context.Context) error {
// FIXME disconnect from db
return nil
},
})
return s, nil