spec_iterator

package
v1.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClosed = errors.New("no more specs to run")

Functions

func ParallelizedIndexRange

func ParallelizedIndexRange(length int, parallelTotal int, parallelNode int) (startIndex int, count int)

Types

type Counter

type Counter struct {
	Index int `json:"index"`
}

type ParallelIterator

type ParallelIterator struct {
	// contains filtered or unexported fields
}

func NewParallelIterator

func NewParallelIterator(specs []*spec.Spec, host string) *ParallelIterator

func (*ParallelIterator) Next

func (s *ParallelIterator) Next() (*spec.Spec, error)

func (*ParallelIterator) NumberOfSpecsPriorToIteration

func (s *ParallelIterator) NumberOfSpecsPriorToIteration() int

func (*ParallelIterator) NumberOfSpecsThatWillBeRunIfKnown

func (s *ParallelIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool)

func (*ParallelIterator) NumberOfSpecsToProcessIfKnown

func (s *ParallelIterator) NumberOfSpecsToProcessIfKnown() (int, bool)

type SerialIterator

type SerialIterator struct {
	// contains filtered or unexported fields
}

func NewSerialIterator

func NewSerialIterator(specs []*spec.Spec) *SerialIterator

func (*SerialIterator) Next

func (s *SerialIterator) Next() (*spec.Spec, error)

func (*SerialIterator) NumberOfSpecsPriorToIteration

func (s *SerialIterator) NumberOfSpecsPriorToIteration() int

func (*SerialIterator) NumberOfSpecsThatWillBeRunIfKnown

func (s *SerialIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool)

func (*SerialIterator) NumberOfSpecsToProcessIfKnown

func (s *SerialIterator) NumberOfSpecsToProcessIfKnown() (int, bool)

type ShardedParallelIterator

type ShardedParallelIterator struct {
	// contains filtered or unexported fields
}

func NewShardedParallelIterator

func NewShardedParallelIterator(specs []*spec.Spec, total int, node int) *ShardedParallelIterator

func (*ShardedParallelIterator) Next

func (s *ShardedParallelIterator) Next() (*spec.Spec, error)

func (*ShardedParallelIterator) NumberOfSpecsPriorToIteration

func (s *ShardedParallelIterator) NumberOfSpecsPriorToIteration() int

func (*ShardedParallelIterator) NumberOfSpecsThatWillBeRunIfKnown

func (s *ShardedParallelIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool)

func (*ShardedParallelIterator) NumberOfSpecsToProcessIfKnown

func (s *ShardedParallelIterator) NumberOfSpecsToProcessIfKnown() (int, bool)

type SpecIterator

type SpecIterator interface {
	Next() (*spec.Spec, error)
	NumberOfSpecsPriorToIteration() int
	NumberOfSpecsToProcessIfKnown() (int, bool)
	NumberOfSpecsThatWillBeRunIfKnown() (int, bool)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL