Documentation ¶
Overview ¶
Copyright 2021 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2021 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2021 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
View Source
const ( DefaultTTL = 1000 * time.Hour // disabled to manage leftover lockfiles manually for now DefaultRetryBackoff = time.Minute )
Variables ¶
View Source
var (
ErrLockBusy = errors.New("lock is busy")
)
Functions ¶
This section is empty.
Types ¶
type BucketLock ¶
type BucketLock interface { // Lock tries acquiring lock or fails rigth away. Lock() error // Release tries releasing an owned lock or fails. Release() error }
func NewNoop ¶
func NewNoop() BucketLock
Noop returns a NO-OP lock, to be used when releasing stuff that won't need locking.
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
InMemory lock for testing puposes.
func NewInMemory ¶
func NewInMemory() *InMemory
type Logf ¶
type Logf func(format string, args ...interface{})
Logf logger to provide feedback on retries.
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
S3 based lock.
Click to show internal directories.
Click to hide internal directories.