Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NumGoRoutineThrottler ¶ added in v1.0.20
type NumGoRoutineThrottler struct {
// contains filtered or unexported fields
}
NumGoRoutineThrottler can limit the number of go routines launched
func NewNumGoRoutineThrottler ¶ added in v1.0.20
func NewNumGoRoutineThrottler(max int32) (*NumGoRoutineThrottler, error)
NewNumGoRoutineThrottler creates a new num go routine throttler instance
func (*NumGoRoutineThrottler) CanProcess ¶ added in v1.0.20
func (ngrt *NumGoRoutineThrottler) CanProcess() bool
CanProcess returns true if current counter is less than max
func (*NumGoRoutineThrottler) EndProcessing ¶ added in v1.0.20
func (ngrt *NumGoRoutineThrottler) EndProcessing()
EndProcessing will decrement current counter
func (*NumGoRoutineThrottler) IsInterfaceNil ¶ added in v1.0.20
func (ngrt *NumGoRoutineThrottler) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*NumGoRoutineThrottler) StartProcessing ¶ added in v1.0.20
func (ngrt *NumGoRoutineThrottler) StartProcessing()
StartProcessing will increment current counter
Click to show internal directories.
Click to hide internal directories.