Allow returns nil if operation is allowed or an error otherwise. If operation is allowed client must ReportResult of the operation whether it is a success or a failure.
()
| 39 | // If operation is allowed client must ReportResult of the operation |
| 40 | // whether it is a success or a failure. |
| 41 | Allow() error |
| 42 | // ReportResult reports the result of the previously allowed operation. |
| 43 | // nil indicates a success, non-nil error usually indicates a failure. |
| 44 | ReportResult(result error) |