diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2020-09-08 18:30:35 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2020-09-08 18:30:35 +0300 |
commit | c8ab60d96bfec0c9f13e70f2a03e8207df9e7922 (patch) | |
tree | 48abac31d7fa5858dbd7a78851ef7b5551309fac /internal/praefect | |
parent | f51896682ed1b30293c8fb3e54beda4c4cde5aa5 (diff) |
Renaming of the 'whitelist' to 'allowlist'
All 'whitelist's replaced with 'allowlist'.
Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/3031
Diffstat (limited to 'internal/praefect')
-rw-r--r-- | internal/praefect/replicator.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/praefect/replicator.go b/internal/praefect/replicator.go index f31745381..440ee0ec9 100644 --- a/internal/praefect/replicator.go +++ b/internal/praefect/replicator.go @@ -312,8 +312,8 @@ type ReplMgr struct { replDelayMetric prommetrics.HistogramVec replJobTimeout time.Duration dequeueBatchSize uint - // whitelist contains the project names of the repos we wish to replicate - whitelist map[string]struct{} + // allowlist contains the project names of the repos we wish to replicate + allowlist map[string]struct{} } // ReplMgrOpt allows a replicator to be configured with additional options @@ -346,7 +346,7 @@ func NewReplMgr(log *logrus.Entry, virtualStorages []string, queue datastore.Rep r := ReplMgr{ log: log.WithField("component", "replication_manager"), queue: queue, - whitelist: map[string]struct{}{}, + allowlist: map[string]struct{}{}, replicator: defaultReplicator{log, rs}, virtualStorages: virtualStorages, nodeManager: nodeMgr, @@ -376,11 +376,11 @@ func (r ReplMgr) Collect(ch chan<- prometheus.Metric) { r.replInFlightMetric.Collect(ch) } -// WithWhitelist will configure a whitelist for repos to allow replication -func WithWhitelist(whitelistedRepos []string) ReplMgrOpt { +// WithAllowlist will configure a allowlist for repos to allow replication +func WithAllowlist(allowlistedRepos []string) ReplMgrOpt { return func(r *ReplMgr) { - for _, repo := range whitelistedRepos { - r.whitelist[repo] = struct{}{} + for _, repo := range allowlistedRepos { + r.allowlist[repo] = struct{}{} } } } |