definitions

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefinitionBatchActions added in v0.12.0

type DefinitionBatchActions struct {
	// PreFinalize may perform a blocking action (possibly to an external connector) that should execute outside database RunAsGroup
	PreFinalize func(ctx context.Context) error

	// Finalize may perform final, non-idempotent database operations (such as inserting Events)
	Finalize func(ctx context.Context) error
}

DefinitionBatchActions are actions to be taken at the end of a definition batch See further notes on "batchActions" in the event aggregator

type DefinitionHandlers

type DefinitionHandlers interface {
	privatemessaging.GroupManager

	HandleDefinitionBroadcast(ctx context.Context, msg *fftypes.Message, data []*fftypes.Data) (DefinitionMessageAction, *DefinitionBatchActions, error)
	SendReply(ctx context.Context, event *fftypes.Event, reply *fftypes.MessageInOut)
}

DefinitionHandlers interface allows components to call broadcast/private messaging functions internally (without import cycles)

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL