modules

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShareModuleFactory = &ModuleFactory{
	generators: make(map[string]func() DeliveryModule, 10),
}

Functions

This section is empty.

Types

type DAGDeliveryModule

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

func NewDAGDeliveryModule

func NewDAGDeliveryModule(name string,
	analysisFunc func(AuditEvents []*shares.AuditEvent, beginTime *time.Time, endTime *time.Time) (result string, hasError bool)) *DAGDeliveryModule

func (*DAGDeliveryModule) CanDo

func (a *DAGDeliveryModule) CanDo() bool

判断依赖的父亲节点是否已经结束

func (*DAGDeliveryModule) Children

func (a *DAGDeliveryModule) Children() []*DAGDeliveryModule

func (*DAGDeliveryModule) Do

func (a *DAGDeliveryModule) Do(auditEvents []*shares.AuditEvent, beginTime *time.Time, endTime *time.Time) (result string, hasError bool)

func (*DAGDeliveryModule) FinishProcess

func (a *DAGDeliveryModule) FinishProcess()

func (*DAGDeliveryModule) IsParentsReady

func (a *DAGDeliveryModule) IsParentsReady() bool

func (*DAGDeliveryModule) Name

func (a *DAGDeliveryModule) Name() string

func (*DAGDeliveryModule) SetAnalysisFunc

func (a *DAGDeliveryModule) SetAnalysisFunc(f func(AuditEvents []*shares.AuditEvent, beginTime *time.Time, endTime *time.Time) (result string, hasError bool))

func (*DAGDeliveryModule) SetChildren

func (a *DAGDeliveryModule) SetChildren(children []DeliveryModule)

func (*DAGDeliveryModule) SetParents

func (a *DAGDeliveryModule) SetParents(parents []DeliveryModule)

func (*DAGDeliveryModule) Stop

func (a *DAGDeliveryModule) Stop()

type DeliveryModule

type DeliveryModule interface {
	Do(AuditEvents []*shares.AuditEvent, beginTime *time.Time, endTime *time.Time) (result string, hasError bool)
	Name() string
	CanDo() bool
	SetParents([]DeliveryModule)
	SetChildren([]DeliveryModule)
	Stop()
}

type ModuleFactory

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

func (*ModuleFactory) GetModuleByName

func (m *ModuleFactory) GetModuleByName(moduleName string) DeliveryModule

func (*ModuleFactory) Register

func (m *ModuleFactory) Register(moduleName string, generator func() DeliveryModule)

type ProcessState

type ProcessState string
const (
	ProcessingState ProcessState = "Processing"
	FinishedState   ProcessState = "Finished"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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