Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶ added in v0.2.0
type Group[I, O any] struct { // contains filtered or unexported fields }
Group for running background operations.
func (*Group[I, O]) Drain ¶ added in v0.4.0
func (g *Group[I, O]) Drain()
Drain all pending outputs. This acts as a barrier to ensure that there are no more group operations running in the background.
func (*Group[I, O]) Recv ¶ added in v0.4.0
Recv receives pending outputs. Setting "wait" to true will make this function wait for all inputs to complete being processed before returning. The "results" callback will fire for all outputs in the same order as their respective inputs. If the group operation or callback returned an error then the iterator will stop and that error will be returned to the call of this function.
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter is for limiting the number of concurrent operations.
type Queue ¶ added in v0.3.0
type Queue[I, O any] struct { // contains filtered or unexported fields }
Queue is a limiter queue operations that executes each operation in background goroutines, where each operation has a single input and output. The inputs are pushed onto the queue using Push, and the output can be retrieved using Pop.
func (*Queue[I, O]) Pop ¶ added in v0.3.0
Pop output off the queue. The outputs will be returned in order of their respective inputs. Returns false if the queue is empty of if the next input operation has not yet finished processing.