Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Namespace is used to separate locks from different applications.
Namespace int32
}
Config holds the configuration for the pgx lock service.
type Option ¶
type Option interface {
Apply(*Config)
}
Option configures a lock service instance.
func WithNamespace ¶
WithNamespace returns an option that sets the namespace for locks. The namespace is used as the first key in PostgreSQL advisory locks.
type OptionFunc ¶
type OptionFunc func(*Config)
OptionFunc is a function that configures a lock config.
Click to show internal directories.
Click to hide internal directories.