misc: Fix typos and spelling errors

This commit is contained in:
Edward Toroshchyn
2025-02-24 15:59:00 +01:00
parent 1f90de31e7
commit c25a2a257b
40 changed files with 62 additions and 62 deletions

View File

@@ -84,7 +84,7 @@ func MaxCount(maxCount int) Option {
}
}
// ReuseLease specifies whether we should try and re-use the lease between runs.
// ReuseLease specifies whether we should try and reuse the lease between runs.
// Ordinarily it would get discarded with each new version (deploy) of the code.
func ReuseLease(reuseLease bool) Option {
return func(so *schedulerOptions) {

View File

@@ -72,7 +72,7 @@ func (obj *rrStrategy) Schedule(hostnames map[string]string, opts *schedulerOpti
}
}
// remove any hosts we previouly knew about from the list
// remove any hosts we previously knew about from the list
for ix := len(obj.hosts) - 1; ix >= 0; ix-- {
if !util.StrInList(obj.hosts[ix], sortedHosts) {
// delete entry at this index

View File

@@ -146,8 +146,8 @@ func Schedule(client *etcd.Client, path string, hostname string, opts ...Option)
sessionOptions := []concurrency.SessionOption{}
// here we try to re-use lease between multiple runs of the code
// TODO: is it a good idea to try and re-use the lease b/w runs?
// here we try to reuse lease between multiple runs of the code
// TODO: is it a good idea to try and reuse the lease b/w runs?
if options.reuseLease {
if leaseID, exists := schedulerLeases[path]; exists {
sessionOptions = append(sessionOptions, concurrency.WithLease(leaseID))