观察者
我们支持使用分布式消息系统,例如 etcd 来保持多个Casbin执行器实例之间的一致性。 因此,我们的用户可以同时使用多个Casbin 执行器来处理大量的权限检查请求。
与策略存储 adapters类似,我们没有把watcher的代码放在主库中。 任何对新消息系统的支持都应该作为atcher程序来实现。 完整的Casbin watchers列表如下所示。 欢迎任何第三方对 watcher 进行新的贡献,如果有请告知我们,我将把它放在这个列表中:)
Watcher | Type | Author | Description |
---|---|---|---|
Etcd Watcher | KV store | Casbin | Watcher for etcd |
NATS Watcher | Messaging system | Soluto | Watcher for NATS |
ZooKeeper Watcher | KV store | Grepsr | Watcher for Apache ZooKeeper |
Redis Watcher | KV store | @billcobbler | Watcher for Redis |
GCP Pub/Sub Watcher | Messaging system | LivingPackets | Watcher for Google Cloud Platform PUB/SUB |
NATS, RabbitMQ, GCP Pub/Sub, AWS SNS & SQS, Kafka, InMemory | Messaging System | rusenask | Watcher based on Go Cloud Dev Kit that works with leading cloud providers and self-hosted infrastructure |
Watcher | Type | Author | Description |
---|---|---|---|
Etcd Adapter | KV store | @fanlide | Watcher for etcd |
Watcher | Type | Author | Description |
---|---|---|---|
Etcd Watcher | KV store | Casbin | Watcher for etcd |
Redis Watcher | KV store | Casbin | Watcher for Redis |
Pub/Sub Watcher | Messaging system | hjl | Watcher for Google Cloud Pub/Sub |
Postgres Watcher | Database | Matteo Collina | Watcher for PostgreSQL |
Watcher | Type | Author | Description |
---|---|---|---|
Redis Watcher | KV store | ScienceLogic | Watcher for Redis |
PostgreSQL Watcher | Database | Casbin | Watcher for PostgreSQL |
Watcher | Type | Author | Description |
---|---|---|---|
Redis Watcher | KV store | @Sbou | Watcher for Redis |
WatcherEx
In order to support incremental synchronization between multiple instances, we provide the WatcherEx
interface. We hope it can notify other instances when the policy changes, but there is currently no implementation of WatcherEx
. We recommend that you use dispatcher to achieve this.