Skip to content

Commit

Permalink
ring: expand documentation of ReplicationSet.Do()
Browse files Browse the repository at this point in the history
Just to be explicit about what is in the return value.
Also fix a typo.
  • Loading branch information
bboreham committed Jan 26, 2022
1 parent 0bff37e commit b0834a7
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 b0834a7

Please sign in to comment.