func (l *Lock) Owner() string {
	l.mu.Lock()
	defer l.mu.Unlock()
	return l.owner
}
Owner returns who currently owns the lock.
package pglock
import (
	"context"
	"sync"
	"time"
)
const lockMaxLogLines = 50
type Lock struct {
	client           *Client
	name             string
	owner            string
	heartbeatWG      sync.WaitGroup
	heartbeatContext context.Context
	heartbeatCancel  context.CancelFunc
	leaseDuration    time.Duration
	replaceData   bool
	data          []byte
	failIfLocked  bool
	keepOnRelease bool
	mu                  sync.Mutex
	isReleased          bool
	recordVersionNumber int64
}
func (l *Lock) Data() []byte {
	return l.data
}
func (l *Lock) Close() error {
	return l.client.Release(l)
}
func (l *Lock) IsReleased() bool {
	l.mu.Lock()
	defer l.mu.Unlock()
	return l.isReleased
}