MCPcopy
hub / github.com/apache/casbin / Update

Method Update

persist/watcher.go:26–26  ·  view source on GitHub ↗

Update calls the update callback of other instances to synchronize their policy. It is usually called after changing the policy in DB, like Enforcer.SavePolicy(), Enforcer.AddPolicy(), Enforcer.RemovePolicy(), etc.

()

Source from the content-addressed store, hash-verified

24 // It is usually called after changing the policy in DB, like Enforcer.SavePolicy(),
25 // Enforcer.AddPolicy(), Enforcer.RemovePolicy(), etc.
26 Update() error
27 // Close stops and releases the watcher, the callback function will not be called any more.
28 Close()
29}

Callers 15

addPolicyMethod · 0.65
addPoliciesMethod · 0.65
removePolicyMethod · 0.65
updatePolicyMethod · 0.65
updatePoliciesMethod · 0.65
removePoliciesMethod · 0.65
removeFilteredPolicyMethod · 0.65
SavePolicyCtxMethod · 0.65
addPolicyCtxMethod · 0.65
addPoliciesCtxMethod · 0.65
updatePolicyCtxMethod · 0.65

Implementers 1

SampleWatcherwatcher_test.go

Calls

no outgoing calls

Tested by

no test coverage detected