job

package
v0.0.0-...-ec894cc Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const AggregationJobName = "aggregation"
View Source
const RecoveryJobName = "recovery"
View Source
const TriggerJobName = "trigger"

Variables

This section is empty.

Functions

func BuildEventFinger

func BuildEventFinger(groupRule string, evt repository.Event) string

func BuildEventMatchTest

func BuildEventMatchTest(ruleRepo repository.RuleRepo) func(msg repository.Event) ([]MatchedRule, error)

BuildEventMatchTest 创建 event 与规则的匹配测试,用于检测 event 能够匹配哪些规则

func NewDistributeLockManager

func NewDistributeLockManager(lockRepo repository.LockRepo, owner string) scheduler.LockManager

Types

type AggregationJob

type AggregationJob struct {
	// contains filtered or unexported fields
}

func NewAggregationJob

func NewAggregationJob(app infra.Resolver) *AggregationJob

func (*AggregationJob) Handle

func (a *AggregationJob) Handle()

Handle do two things: 1. message grouping, delivery all ungrouped messages to message group 2. change the message groups that satisfied the conditions to pending status

type DistributeLockManager

type DistributeLockManager struct {
	// contains filtered or unexported fields
}

func (*DistributeLockManager) HasLock

func (d *DistributeLockManager) HasLock() bool

func (*DistributeLockManager) Release

func (d *DistributeLockManager) Release(ctx context.Context) error

func (*DistributeLockManager) TryLock

func (d *DistributeLockManager) TryLock(ctx context.Context) error

type MatchedRule

type MatchedRule struct {
	Rule         repository.Rule `json:"rule"`
	AggregateKey string          `json:"aggregate_key"`
}

type Provider

type Provider struct{}

func (Provider) Aggregates

func (s Provider) Aggregates() []infra.Provider

func (Provider) Boot

func (s Provider) Boot(app infra.Resolver)

func (Provider) Register

func (s Provider) Register(app infra.Binder)

type RecoveryJob

type RecoveryJob struct {
	// contains filtered or unexported fields
}

func NewRecoveryJob

func NewRecoveryJob(app infra.Resolver) *RecoveryJob

func (*RecoveryJob) Handle

func (a *RecoveryJob) Handle()

type TriggerJob

type TriggerJob struct {
	// contains filtered or unexported fields
}

func NewTrigger

func NewTrigger(app infra.Resolver) *TriggerJob

func (TriggerJob) Handle

func (a TriggerJob) Handle()

Jump to

Keyboard shortcuts

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