Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LineRangeList ¶ added in v0.1.0
type LineRangeList []LineRange
func CalculatePartialRanges ¶
func CalculatePartialRanges(rscList []string, offset, limit int) LineRangeList
CalculatePartialRanges calculates ranges for individual resources (corpora) in case we know that:
- we need global offset and limit
- we create result by round robin selection from individual records.
Please note that the offset is zero-based! Also, the order of resulting ranges may differ from the `rscList` so the iteration always starts from the correct resource. The order is changed only by rotating the resource list.
E.g. for two corpora and offset 100, we set offset 50 for each corpus. But because we don't know whether each of the corpora will be able to provide enough records, we have to set the global limit for each individual resource so in case all but one corpora results are empty, we can still provide the required number of items.
func (LineRangeList) PIDList ¶ added in v0.1.7
func (lrlist LineRangeList) PIDList() []string
func (LineRangeList) Resources ¶ added in v0.1.0
func (lrlist LineRangeList) Resources() []string