TransactionalEnforcer extends Enforcer with transaction support. It provides atomic policy operations through transactions.
| 28 | // TransactionalEnforcer extends Enforcer with transaction support. |
| 29 | // It provides atomic policy operations through transactions. |
| 30 | type TransactionalEnforcer struct { |
| 31 | *Enforcer // Embedded enforcer for all standard functionality |
| 32 | activeTransactions sync.Map // Stores active transactions. |
| 33 | modelVersion int64 // Model version number for optimistic locking. |
| 34 | commitLock sync.Mutex // Protects commit and rollback operations. |
| 35 | } |
| 36 | |
| 37 | // NewTransactionalEnforcer creates a new TransactionalEnforcer. |
| 38 | // It accepts the same parameters as NewEnforcer. |
nothing calls this directly
no outgoing calls
no test coverage detected