type
AfterCommitEffect
The operation details and callback passed to an after-commit dispatcher.
Arguments
| Argument | Type | Description |
|---|---|---|
Operation | operation.Kind | The committed operation. |
CollectionID | schema.StableID | Affected collection identity. |
GlobalID | schema.StableID | Affected global identity, when applicable. |
DocumentID | string | The document ID, or an empty string when the operation has no single document, such as a list read. |
Run | func(context.Context) error | Run the original hook outside its committed transaction using the supplied execution context. |
Full signature
type AfterCommitEffect struct {
// Operation identifies the committed operation.
Operation operation.Kind
// CollectionID identifies the affected collection.
CollectionID schema.StableID
// GlobalID identifies the affected global, when applicable.
GlobalID schema.StableID
// DocumentID identifies the affected document; it is empty for an effect
// without a single document, such as a list read.
DocumentID string
// Run calls the hook outside its original transaction. Pass the effect's
// execution context to control cancellation and deadlines.
Run func(context.Context) error
}