Documentation ¶
Index ¶
Constants ¶
View Source
const RetryCount int = 50
RetryCount is a number of retries when trying to open the database
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvisoryLocker ¶
type AdvisoryLocker interface { Lock(ctx context.Context, key string) error Unlock(ctx context.Context, key string) error TryLock(ctx context.Context, key string) (bool, error) }
AdvisoryLocker represents Advisory locking in Postgres
type Connection ¶
type Connection interface { GetAdvisoryLocker() AdvisoryLocker Close() error }
Connection represents database connection
type DatabaseConnector ¶
type DatabaseConnector interface {
GetConnection(ctx context.Context) (Connection, error)
}
DatabaseConnector returns database connection
func Configure ¶
func Configure(ctx context.Context, conf persistence.DatabaseConfig) (DatabaseConnector, func() error, error)
Click to show internal directories.
Click to hide internal directories.