sync_contribution

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSyncContributionCount = errors.New("invalid number of sync contributions")

ErrInvalidSyncContributionCount is returned when insufficient number of sync contributions is provided for aggregation.

Functions

func Aggregate

Aggregate aggregates sync contributions. The minimal number of sync contributions is returned. Aggregation occurs in-place i.e. contents of input array will be modified. Should you need to preserve input sync contributions, clone them before aggregating.

Types

type SyncContributionAggregationStrategy

type SyncContributionAggregationStrategy string

SyncContributionAggregationStrategy defines SyncContribution aggregation strategy.

const (
	// NaiveAggregation is an aggregation strategy without any optimizations.
	NaiveAggregation SyncContributionAggregationStrategy = "naive"

	// MaxCoverAggregation is a strategy based on Maximum Coverage greedy algorithm.
	MaxCoverAggregation SyncContributionAggregationStrategy = "max_cover"
)

Jump to

Keyboard shortcuts

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