job

package
v0.0.0-...-c229084 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 21 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) cron.DistributeLockManager

Types

type AggregationJob

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

func NewAggregationJob

func NewAggregationJob(app container.Container) *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) TryLock

func (d *DistributeLockManager) TryLock() error

func (*DistributeLockManager) TryUnLock

func (d *DistributeLockManager) TryUnLock() error

type MatchedRule

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

type RecoveryJob

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

func NewRecoveryJob

func NewRecoveryJob(app container.Container) *RecoveryJob

func (*RecoveryJob) Handle

func (a *RecoveryJob) Handle()

type ServiceProvider

type ServiceProvider struct{}

func (ServiceProvider) Boot

func (s ServiceProvider) Boot(app infra.Glacier)

func (ServiceProvider) Register

func (s ServiceProvider) Register(app container.Container)

type TriggerJob

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

func NewTrigger

func NewTrigger(app container.Container) *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