mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 12:37:33 +00:00
chore: move the go code into a subfolder
This commit is contained in:
34
apps/api/internal/v2/eventstore/postgres/storage.go
Normal file
34
apps/api/internal/v2/eventstore/postgres/storage.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/database"
|
||||
"github.com/zitadel/zitadel/internal/v2/eventstore"
|
||||
)
|
||||
|
||||
var (
|
||||
_ eventstore.Pusher = (*Storage)(nil)
|
||||
_ eventstore.Querier = (*Storage)(nil)
|
||||
)
|
||||
|
||||
type Storage struct {
|
||||
client *database.DB
|
||||
config *Config
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
MaxRetries uint32
|
||||
}
|
||||
|
||||
func New(client *database.DB, config *Config) *Storage {
|
||||
return &Storage{
|
||||
client: client,
|
||||
config: config,
|
||||
}
|
||||
}
|
||||
|
||||
// Health implements eventstore.Pusher.
|
||||
func (s *Storage) Health(ctx context.Context) error {
|
||||
return s.client.PingContext(ctx)
|
||||
}
|
Reference in New Issue
Block a user