func (l *Lock) IsAlmostExpired() (bool, error) {
	t, err := l.timeUntilDangerZoneEntered()
	if err != nil {
		return false, err
	}
	return t <= 0, nil
}
IsAlmostExpired returns whether or not the lock is entering the "danger
zone" time period.

It returns if the lock has been released or the lock's lease has entered the
"danger zone". It returns false if the lock has not been released and the
lock has not yet entered the "danger zone"
package dynamolock
import (
	"errors"
	"sync"
	"time"
	"github.com/aws/aws-sdk-go/service/dynamodb"
)
type Lock struct {
	semaphore sync.Mutex
	client       *Client
	partitionKey string
	data                []byte
	ownerName           string
	deleteLockOnRelease bool
	isReleased          bool
	sessionMonitor      *sessionMonitor
	lookupTime           time.Time
	recordVersionNumber  string
	leaseDuration        time.Duration
	additionalAttributes map[string]*dynamodb.AttributeValue
}
func (l *Lock) Data() []byte {
	if l == nil {
		return nil
	}
	return l.data
}
func (l *Lock) Close() error {
	if l != nil && l.client != nil {
		if l.IsExpired() {
			return ErrLockAlreadyReleased
		}
		_, err := l.client.ReleaseLock(l)
		return err
	}
	return ErrCannotReleaseNullLock
}
func (l *Lock) uniqueIdentifier() string {
	return l.partitionKey
}
func (l *Lock) IsExpired() bool {
	if l == nil {
		return true
	}
	l.semaphore.Lock()
	defer l.semaphore.Unlock()
	return l.isExpired()
}
func (l *Lock) isExpired() bool {
	if l == nil {
		return true
	}
	if l.isReleased {
		return true
	}
	return time.Since(l.lookupTime) > l.leaseDuration
}
func (l *Lock) updateRVN(rvn string, lastUpdate time.Time, leaseDuration time.Duration) {
	l.recordVersionNumber = rvn
	l.lookupTime = lastUpdate
	l.leaseDuration = leaseDuration
}
func (l *Lock) OwnerName() string {
	if l == nil {
		return ""
	}
	return l.ownerName
}
func (l *Lock) AdditionalAttributes() map[string]*dynamodb.AttributeValue {
	addAttr := make(map[string]*dynamodb.AttributeValue)
	if l != nil {
		for k, v := range l.additionalAttributes {
			addAttr[k] = v
		}
	}
	return addAttr
}