You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
3 years ago | |
|---|---|---|
| .. | ||
| LINGYUN/Abp/DistributedLocking/Dapr | 3 years ago | |
| FodyWeavers.xml | 3 years ago | |
| FodyWeavers.xsd | 3 years ago | |
| LINGYUN.Abp.DistributedLocking.Dapr.csproj | 3 years ago | |
| README.md | 3 years ago | |
README.md
LINGYUN.Abp.DistributedLocking.Dapr
Abp分布式锁的Dapr实现
配置使用
模块按需引用
[DependsOn(typeof(AbpDistributedLockingDaprModule))]
public class YouProjectModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpDistributedLockingDaprOptions>(options =>
{
options.StoreName = "store-name";
options.ResourceId = "resource-id";
options.DefaultTimeout = TimeSpan.FromSeconds(30);
});
}
}
配置说明
- AbpDistributedLockingDaprOptions.StoreName 在dapr component文件中定义的metadata name,默认: lockstore;
- AbpDistributedLockingDaprOptions.ResourceId 自定义一个资源名称,用于向dapr提供锁定的标识,默认: dapr-lock-id;
- AbpDistributedLockingDaprOptions.DefaultTimeout 默认锁定超时时间,默认: 30s.