Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrainCtrl ¶
func DrainCtrl(ctx api.StreamContext, signal any, ctrlCh chan<- any)
DrainCtrl a non-block function to send out the signal to the ctrl channel It will retry in blocking mode once the channel is full and make sure it is delivered finally but may lose order
func DrainError ¶
func DrainError(ctx api.StreamContext, err error, errCh chan<- error)
DrainError a non-block function to send out the error to the error channel Only the first error will be sent out and received then the rule will be terminated Thus the latter error will just skip It is usually the error outlet of an op/rule.
func SafeRun ¶
SafeRun will catch and return the panic error together with other errors When running in a rule, the whole rule must be in this mode The sub processes or go routines under a rule should also use this mode To make sure all rule panic won't affect the whole system Also consider running in this mode if the function should not affect the whole system
Types ¶
This section is empty.