Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefinitionBatchState ¶ added in v0.14.0
type DefinitionBatchState interface { // PreFinalize may perform a blocking action (possibly to an external connector) that should execute outside database RunAsGroup AddPreFinalize(func(ctx context.Context) error) // Finalize may perform final, non-idempotent database operations (such as inserting Events) AddFinalize(func(ctx context.Context) error) // GetPendingConfirm returns a map of messages are that pending confirmation after already being processed in this batch GetPendingConfirm() map[fftypes.UUID]*core.Message // Notify of a DID claim locking in, so a rewind gets queued for it to go back and process any dependent child identities/messages DIDClaimConfirmed(did string) }
DefinitionBatchState tracks the state between definition handlers that run in-line on the pin processing route in the aggregator as part of a batch of pins. They might have complex API calls, and interdependencies, that need to be managed via this state. The actions to be taken at the end of a definition batch. See further notes on "batchState" in the event aggregator
type DefinitionHandler ¶
type DefinitionHandler interface {
HandleDefinitionBroadcast(ctx context.Context, state DefinitionBatchState, msg *core.Message, data core.DataArray, tx *fftypes.UUID) (HandlerResult, error)
}
func NewDefinitionHandler ¶
type DefinitionMessageAction ¶ added in v0.12.0
type DefinitionMessageAction int
DefinitionMessageAction is the action to be taken on an individual definition message
const ( // ActionReject the message was successfully processed, but was malformed/invalid and should be marked as rejected ActionReject DefinitionMessageAction = iota // ActionConfirm the message was valid and should be confirmed ActionConfirm // ActionRetry a recoverable error was encountered - batch should be halted and then re-processed from the start ActionRetry // ActionWait the message is still awaiting further pieces for aggregation and should be held in pending state ActionWait )
func (DefinitionMessageAction) String ¶ added in v0.14.0
func (dma DefinitionMessageAction) String() string
type HandlerResult ¶ added in v0.14.0
type HandlerResult struct { Action DefinitionMessageAction CustomCorrelator *fftypes.UUID }
Source Files ¶
- definition_handler.go
- definition_handler_contracts.go
- definition_handler_datatype.go
- definition_handler_identity_claim.go
- definition_handler_identity_update.go
- definition_handler_identity_verification.go
- definition_handler_namespace.go
- definition_handler_network_node.go
- definition_handler_network_org.go
- definition_handler_tokenpool.go
Click to show internal directories.
Click to hide internal directories.