projectors

package
v1.202405300917.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 19 Imported by: 0

README

codecov

core-projectors

Documentation

Index

Constants

View Source
const (
	DefaultIntentsLimit = builtin.MaxCUDs * 10
)
View Source
const (
	ProjectorsInError = "voedger_projectors_in_error"
)

Variables

View Source
var PLogUpdatesQName = appdef.NewQName(appdef.SysPackage, "PLogUpdates")

Functions

func ActualizerOffset

func ActualizerOffset(appStructs istructs.IAppStructs, partition istructs.PartitionID, projectorName appdef.QName) (offset istructs.Offset, err error)

func NewSyncActualizerFactoryFactory

func NewSyncActualizerFactoryFactory(actualizerFactory SyncActualizerFactory, secretReader isecrets.ISecretReader, n10nBroker in10n.IN10nBroker) func(appStructs istructs.IAppStructs, partitionID istructs.PartitionID) pipeline.ISyncOperator

func ProvideOffsetsDef

func ProvideOffsetsDef(appDefBuilder appdef.IAppDefBuilder)

func ProvideViewDef

func ProvideViewDef(appDef appdef.IAppDefBuilder, qname appdef.QName, buildFunc ViewTypeBuilder)

Types

type AsyncActualizerConf

type AsyncActualizerConf struct {
	Ctx           context.Context
	AppQName      istructs.AppQName
	AppPartitions appparts.IAppPartitions
	AppStructs    state.AppStructsFunc
	SecretReader  isecrets.ISecretReader
	Partition     istructs.PartitionID
	// Optional. Default value: `time.After`
	AfterError TimeAfterFunc
	// Optional. Default value: `core-logger.Error`
	LogError LogErrorFunc
	// Optional.
	AAMetrics AsyncActualizerMetrics
	//IntentsLimit top limit per event, optional, default value is 100
	IntentsLimit int
	//BundlesLimit top limit when bundle size is greater than this value, actualizer flushes changes to underlying storage, optional, default value is 100
	BundlesLimit int
	//FlushInterval specifies how often the current actualizer flushes changes to underlying storage, optional, default value is 100 milliseconds
	FlushInterval time.Duration
	// FlushPositionInterval specifies how often actializer must save it's position, even when no events has been processed by actualizer. Default is 1 minute
	FlushPositionInterval time.Duration

	VvmName string
	Metrics imetrics.IMetrics

	Broker in10n.IN10nBroker

	Opts []state.ActualizerStateOptFunc
	// contains filtered or unexported fields
}

type AsyncActualizerFactory

type AsyncActualizerFactory func(conf AsyncActualizerConf, projection istructs.Projector) (pipeline.ISyncOperator, error)

AsyncActualizerFactory returns the ServiceOperator<AsyncActualizer> workpiece must implement projectors.IAsyncActualizerWork

func ProvideAsyncActualizerFactory

func ProvideAsyncActualizerFactory() AsyncActualizerFactory

type AsyncActualizerMetrics

type AsyncActualizerMetrics interface {
	Increase(metricName string, partition istructs.PartitionID, projection appdef.QName, valueDelta float64)
	Set(metricName string, partition istructs.PartitionID, projection appdef.QName, value float64)
}

type LogErrorFunc

type LogErrorFunc func(args ...interface{})

type SyncActualizerConf

type SyncActualizerConf struct {
	Ctx          context.Context
	AppStructs   state.AppStructsFunc
	SecretReader isecrets.ISecretReader
	Partition    istructs.PartitionID
	// Fork responsible for cloning work
	WorkToEvent WorkToEventFunc
	//IntentsLimit top limit per event, default value is 100
	IntentsLimit int
	N10nFunc     state.N10nFunc
}

type SyncActualizerFactory

type SyncActualizerFactory func(conf SyncActualizerConf, projectors istructs.Projectors) pipeline.ISyncOperator

SyncActualizerFactory returns the Operator<SyncActualizer> Workpiece is ...?

func ProvideSyncActualizerFactory

func ProvideSyncActualizerFactory() SyncActualizerFactory

type TimeAfterFunc

type TimeAfterFunc func(d time.Duration) <-chan time.Time

type ViewTypeBuilder

type ViewTypeBuilder func(builder appdef.IViewBuilder)

type WorkToEventFunc

type WorkToEventFunc func(work interface{}) istructs.IPLogEvent

Jump to

Keyboard shortcuts

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