Documentation
¶
Overview ¶
Package fencing defines resource leases that issue fencing tokens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLeaseHeld = errors.New("fencing resource lease is held") ErrStaleGrant = errors.New("stale fencing grant") )
Functions ¶
func IsSerializationFailure ¶
IsSerializationFailure reports the PostgreSQL retry class without coupling callers to one concrete driver error type.
Types ¶
type InMemoryProvider ¶
type InMemoryProvider struct {
// contains filtered or unexported fields
}
InMemoryProvider provides local advisory serialization only.
func NewInMemoryProvider ¶
func NewInMemoryProvider() *InMemoryProvider
func (*InMemoryProvider) Guarantee ¶
func (*InMemoryProvider) Guarantee() Guarantee
type Lease ¶
type Lease interface {
Grant() invocation.FencingGrant
Renew(context.Context, time.Duration) error
Release(context.Context) error
}
Lease is one acquired grant.
type PostgresProvider ¶
type PostgresProvider struct {
// contains filtered or unexported fields
}
PostgresProvider issues durable monotonic tokens from V2 migration tables.
func NewPostgresProvider ¶
func NewPostgresProvider(db *sql.DB) (*PostgresProvider, error)
func (*PostgresProvider) Guarantee ¶
func (*PostgresProvider) Guarantee() Guarantee
Click to show internal directories.
Click to hide internal directories.