Documentation
¶
Index ¶
- type Backend
- func (b *Backend) AbortTransfer(ctx context.Context, req shiftlock.AbortRequest) (*shiftlock.ClaimRecord, error)
- func (b *Backend) AcquireClaim(ctx context.Context, req shiftlock.AcquireRequest) (*shiftlock.ClaimRecord, error)
- func (b *Backend) Capabilities() shiftlock.Capabilities
- func (b *Backend) Close() error
- func (b *Backend) CommitTransfer(ctx context.Context, req shiftlock.CommitRequest) (*shiftlock.ClaimRecord, error)
- func (b *Backend) GetClaim(ctx context.Context, claimName string) (*shiftlock.ClaimRecord, error)
- func (b *Backend) GetGeneration(ctx context.Context, generationID string) (*shiftlock.Generation, error)
- func (b *Backend) Migrate(ctx context.Context) error
- func (b *Backend) PrepareTransfer(ctx context.Context, req shiftlock.TransferRequest) (*shiftlock.ClaimRecord, error)
- func (b *Backend) RegisterGeneration(ctx context.Context, gen shiftlock.Generation) error
- func (b *Backend) ReleaseClaim(ctx context.Context, req shiftlock.ReleaseRequest) error
- func (b *Backend) RenewClaim(ctx context.Context, req shiftlock.RenewRequest) (*shiftlock.ClaimRecord, error)
- func (b *Backend) UpdateGeneration(ctx context.Context, gen shiftlock.Generation) error
- func (b *Backend) WatchClaim(ctx context.Context, claimName string) (<-chan shiftlock.ClaimEvent, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend stores ownership in PostgreSQL using transactions and row locks.
func (*Backend) AbortTransfer ¶
func (b *Backend) AbortTransfer(ctx context.Context, req shiftlock.AbortRequest) (*shiftlock.ClaimRecord, error)
func (*Backend) AcquireClaim ¶
func (b *Backend) AcquireClaim(ctx context.Context, req shiftlock.AcquireRequest) (*shiftlock.ClaimRecord, error)
func (*Backend) Capabilities ¶
func (b *Backend) Capabilities() shiftlock.Capabilities
Capabilities implements shiftlock.Capabler.
func (*Backend) CommitTransfer ¶
func (b *Backend) CommitTransfer(ctx context.Context, req shiftlock.CommitRequest) (*shiftlock.ClaimRecord, error)
func (*Backend) GetGeneration ¶
func (*Backend) PrepareTransfer ¶
func (b *Backend) PrepareTransfer(ctx context.Context, req shiftlock.TransferRequest) (*shiftlock.ClaimRecord, error)
func (*Backend) RegisterGeneration ¶
func (*Backend) ReleaseClaim ¶
func (*Backend) RenewClaim ¶
func (b *Backend) RenewClaim(ctx context.Context, req shiftlock.RenewRequest) (*shiftlock.ClaimRecord, error)
func (*Backend) UpdateGeneration ¶
func (*Backend) WatchClaim ¶
Click to show internal directories.
Click to hide internal directories.