Versions in this module Expand all Collapse all v1 v1.0.0 Aug 18, 2024 Changes in this version + func DbMigrations(conf config.Config, secretsManager secrets.SecretsManager) (*migrate.Migrate, error) + func MigrationSucceeded(err error) bool + type Backoff interface + Attempts func() int + MaxAttempts func() int + Next func() *time.Duration + Start func() + func NewBackoff() Backoff + func NewExponentialBackoff(attempts int, initialInterval time.Duration, multiplier float64) Backoff + type DatabaseLock struct + func (lock *DatabaseLock) Obtain(resourceId model.Identifier, clientId model.Identifier) (*Lease, error) + func (lock *DatabaseLock) ObtainWithBackoff(resourceId model.Identifier, clientId model.Identifier, backoff Backoff) (*Lease, error) + func (lock *DatabaseLock) ObtainWithNoWait(resourceId model.Identifier, clientId model.Identifier) (*Lease, error) + func (lock *DatabaseLock) Release(lease *Lease) error + type ExponentialBackoff struct + InitialInterval time.Duration + Multiplier float64 + func (backoff *ExponentialBackoff) Attempts() int + func (backoff *ExponentialBackoff) MaxAttempts() int + func (backoff *ExponentialBackoff) Next() *time.Duration + func (backoff *ExponentialBackoff) Start() + type Lease struct + ClientId model.Identifier + Expiry time.Time + ResourceId model.Identifier + Sequence int + type Lock interface + Obtain func(resourceId model.Identifier, clientId model.Identifier) (*Lease, error) + ObtainWithBackoff func(resourceId model.Identifier, clientId model.Identifier, backoff Backoff) (*Lease, error) + ObtainWithNoWait func(resourceId model.Identifier, clientId model.Identifier) (*Lease, error) + Release func(lease *Lease) error