Registry / database / square-mongo-lock

square-mongo-lock

JSON →
library0.0.0-20230808145049-cfcf499f6bf0gogounverified

mongo-lock provides distributed locking backed by MongoDB.

go get github.com/square/mongo-lock
INSTALL
IMPORT
SIG · SQUARE-MONGO-LOCK
S
square-mongo-lock
databasegov0.0.0-20230808145049-cfcf499f6bf0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lock
github.com/square/mongo-lock

Create a distributed lock in MongoDB.

package main import ( "context" "github.com/square/mongo-lock" "go.mongodb.org/mongo-driver/mongo" ) func main() { client, _ := mongo.Connect(context.Background()) c := lock.NewClient(client.Database("locks").Collection("locks")) c.Create(context.Background(), "my-lock") }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20230808145049-cfcf499f6bf0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
Meta
1
Amazon
1
OpenAI (training)
1
Resources
square-mongo-lock — go get square-mongo-lock · libregistry