Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LongestDurationForProcess defines the timeout interval for asynchronous event processing LongestDurationForProcess = 20 * time.Minute )
View Source
const (
// WorkersPerProcessor indicates the number of asynchronous threads for each type of event processing
WorkersPerProcessor = 5
)
Variables ¶
This section is empty.
Functions ¶
func GetProcesses ¶
func GetProcesses() map[string]IProcessor
GetProcesses returns the type of process
func StartAllProcessors ¶
func StartAllProcessors(stopCh <-chan struct{})
StartAllProcessors start all register process
Types ¶
type IProcessor ¶
type IProcessor interface { List() ([]interface{}, error) Process(opType string, obj interface{}) Run(stopCh <-chan struct{}) ProcessType() string ProcessObject() interface{} }
IProcessor is asynchronous thread interface
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor the struct of process attribute
func NewProcessor ¶
func NewProcessor(name string, processorObj interface{}, handlerType handler.Type, resourceType resource.Type, workerCounts int, actionSets sets.String) *Processor
NewProcessor return the entity object of process
func (*Processor) ProcessObject ¶
func (p *Processor) ProcessObject() interface{}
ProcessObject return the object of process
func (*Processor) ProcessType ¶
ProcessType return the process name
Click to show internal directories.
Click to hide internal directories.