AddOperation adds a policy operation to the buffer. This operation will be applied when the transaction is committed.
(op persist.PolicyOperation)
| 42 | // AddOperation adds a policy operation to the buffer. |
| 43 | // This operation will be applied when the transaction is committed. |
| 44 | func (tb *TransactionBuffer) AddOperation(op persist.PolicyOperation) { |
| 45 | tb.mutex.Lock() |
| 46 | defer tb.mutex.Unlock() |
| 47 | tb.operations = append(tb.operations, op) |
| 48 | } |
| 49 | |
| 50 | // GetOperations returns all buffered operations. |
| 51 | // Returns a copy to prevent external modifications. |
no outgoing calls
no test coverage detected