events

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDefaults

func InitDefaults()

Types

type ManagedStream added in v1.5.3

type ManagedStream interface {
	Stream

	// VerifyListenerOptions is used in create/update to verify and resolve the full spec
	// including the Name, which defaults to the resolved signature
	VerifyListenerOptions(ctx context.Context, id *fftypes.UUID, updatesOrNew *apitypes.Listener) (*apitypes.Listener, error)

	// PrepareListenerUpdate checks a spec previously returned by VerifyListenerOptions against the
	// current state of the stream, without changing anything. The caller persists the returned
	// Spec, then calls Apply() to make the update live.
	PrepareListenerUpdate(ctx context.Context, spec *apitypes.Listener, reset bool) (*PreparedListenerUpdate, error)
}

ManagedStream extends the connector-facing stream interface with the extra functions FFTM's manager needs - which cannot be added to pkg/eventapi without breaking connectors.

func NewAPIManagedEventStream

func NewAPIManagedEventStream(
	bgCtx context.Context,
	persistedSpec *apitypes.EventStream,
	connector ffcapi.API,
	listeners []*apitypes.Listener,
	eme metrics.EventMetricsEmitter,
) (ees ManagedStream, err error)

func NewEventStream

func NewEventStream(
	bgCtx context.Context,
	persistedSpec *apitypes.EventStream,
	connector ffcapi.API,
	checkpointsDB persistence.CheckpointPersistence,
	wsChannels ws.WebSocketChannels,
	initialListeners []*apitypes.Listener,
	eme metrics.EventMetricsEmitter,
) (ees ManagedStream, err error)

type PreparedListenerUpdate added in v1.5.3

type PreparedListenerUpdate struct {
	Spec *apitypes.Listener // new/updated spec fully validated
	// contains filtered or unexported fields
}

PreparedListenerUpdate is a listener create/update that has been validated against a stream, but not yet applied. This allows the change to be persisted to the database after prepare, before apply.

func (*PreparedListenerUpdate) Apply added in v1.5.3

Apply finalizes the update so this new version is the one in the in-memory map of listeners for the stream, and resetting the checkpoint if required.

type Stream

type Stream = eventapi.EventStream

Jump to

Keyboard shortcuts

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