MCPcopy Index your code
hub / github.com/apache/casbin / GetOperations

Method GetOperations

transaction_buffer.go:52–60  ·  view source on GitHub ↗

GetOperations returns all buffered operations. Returns a copy to prevent external modifications.

()

Source from the content-addressed store, hash-verified

50// GetOperations returns all buffered operations.
51// Returns a copy to prevent external modifications.
52func (tb *TransactionBuffer) GetOperations() []persist.PolicyOperation {
53 tb.mutex.RLock()
54 defer tb.mutex.RUnlock()
55
56 // Return a copy to prevent external modifications.
57 result := make([]persist.PolicyOperation, len(tb.operations))
58 copy(result, tb.operations)
59 return result
60}
61
62// Clear removes all buffered operations.
63// This is typically called after a successful commit or rollback.

Callers 3

CommitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected