Documentation
¶
Index ¶
Constants ¶
View Source
const ( LOCKER_INMEMORY = "inmemory" LOCKER_POSTGRES = "postgres" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryLocker ¶
type InMemoryLocker struct {
// contains filtered or unexported fields
}
func NewInMemoryLocker ¶
func NewInMemoryLocker() *InMemoryLocker
func (*InMemoryLocker) AcquireLock ¶
type LockerOption ¶ added in v0.1.152
type LockerOption func(*PostgresLocker)
func WithConnMaxIdleTime ¶ added in v0.1.152
func WithConnMaxIdleTime(d time.Duration) LockerOption
func WithConnMaxLifetime ¶ added in v0.1.152
func WithConnMaxLifetime(d time.Duration) LockerOption
func WithMaxIdleConns ¶ added in v0.1.152
func WithMaxIdleConns(n int) LockerOption
func WithMaxOpenConns ¶ added in v0.1.152
func WithMaxOpenConns(n int) LockerOption
type PostgresLocker ¶
type PostgresLocker struct {
// contains filtered or unexported fields
}
func NewPostgresLocker ¶
func NewPostgresLocker(dsn string, opts ...LockerOption) (*PostgresLocker, error)
func (*PostgresLocker) AcquireLock ¶
Click to show internal directories.
Click to hide internal directories.