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