Skip to content

Commit 1024146

Browse files
committed
Add source code links to locks documentation
- Add GitHub links to ILockProvider interface - Add links to all lock provider implementations: - CacheLockProvider - ThrottlingLockProvider - ScopedLockProvider - Improves documentation discoverability
1 parent 59cc2f5 commit 1024146

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎docs/guide/locks.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Locks ensure a resource is only accessed by one consumer at any given time. Foun
44

55
## The ILockProvider Interface
66

7+
[View source](https://github.com/FoundatioFx/Foundatio/blob/main/src/Foundatio/Lock/ILockProvider.cs)
8+
79
```csharp
810
public interface ILockProvider
911
{
@@ -34,6 +36,8 @@ public interface ILock : IAsyncDisposable
3436

3537
Uses a cache client and message bus for distributed locking:
3638

39+
[View source](https://github.com/FoundatioFx/Foundatio/blob/main/src/Foundatio/Lock/CacheLockProvider.cs)
40+
3741
```csharp
3842
using Foundatio.Lock;
3943
using Foundatio.Caching;
@@ -64,6 +68,8 @@ var locker = new CacheLockProvider(cache, messageBus);
6468

6569
Limits the number of operations within a time period:
6670

71+
[View source](https://github.com/FoundatioFx/Foundatio/blob/main/src/Foundatio/Lock/ThrottlingLockProvider.cs)
72+
6773
```csharp
6874
using Foundatio.Lock;
6975

@@ -91,6 +97,8 @@ else
9197

9298
Prefixes all lock keys with a scope:
9399

100+
[View source](https://github.com/FoundatioFx/Foundatio/blob/main/src/Foundatio/Lock/ScopedLockProvider.cs)
101+
94102
```csharp
95103
using Foundatio.Lock;
96104

0 commit comments

Comments
 (0)