Skip to content

Commit

Permalink
Merge pull request #119 from grafana/do-comment
Browse files Browse the repository at this point in the history
ring: expand documentation of ReplicationSet.Do()
  • Loading branch information
bboreham authored Jan 31, 2022
2 parents 37ca220 + b0834a7 commit 5153b07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ring/replication_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ type ReplicationSet struct {
MaxUnavailableZones int
}

// Do function f in parallel for all replicas in the set, erroring is we exceed
// Do function f in parallel for all replicas in the set, erroring if we exceed
// MaxErrors and returning early otherwise.
// Return a slice of all results from f, or nil if an error occurred.
func (r ReplicationSet) Do(ctx context.Context, delay time.Duration, f func(context.Context, *InstanceDesc) (interface{}, error)) ([]interface{}, error) {
type instanceResult struct {
res interface{}
Expand Down

0 comments on commit 5153b07

Please sign in to comment.