type

AfterCommitEffect

The operation details and callback passed to an after-commit dispatcher.

Arguments

ArgumentTypeDescription
Operationoperation.KindThe committed operation.
CollectionIDschema.StableIDAffected collection identity.
GlobalIDschema.StableIDAffected global identity, when applicable.
DocumentIDstringThe document ID, or an empty string when the operation has no single document, such as a list read.
Runfunc(context.Context) errorRun 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 }

Source core/hook.go:94

Related types

  • Kind

    Kind identifies a document operation at resource and field callback boundaries.

  • StableID

    A deterministic identifier for schema evolution.

Related guides