b218002752
This patch makes it easier to configure existing placement rules only with string. 1. placement(n) rule can be used to reuse earlier definitions 2 .&& can be used in addition to all(n1,n2) 3. country(c) accepts exclusions (like '!RU'), regions ('EU','EEA'), all and none See the 'full example' unit test, which uses all of these, in a realistic example. https://github.com/storj/storj/issues/6126 Change-Id: Ica76f016ebd002eb7ea8103d4258bacd6a6d77bf
45 lines
934 B
Go
45 lines
934 B
Go
// Copyright (C) 2023 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package nodeselection
|
|
|
|
import "storj.io/common/storj/location"
|
|
|
|
// EuCountries defines the member countries of European Union.
|
|
var EuCountries = []location.CountryCode{
|
|
location.Austria,
|
|
location.Belgium,
|
|
location.Bulgaria,
|
|
location.Croatia,
|
|
location.Cyprus,
|
|
location.Czechia,
|
|
location.Denmark,
|
|
location.Estonia,
|
|
location.Finland,
|
|
location.France,
|
|
location.Germany,
|
|
location.Greece,
|
|
location.Hungary,
|
|
location.Ireland,
|
|
location.Italy,
|
|
location.Lithuania,
|
|
location.Latvia,
|
|
location.Luxembourg,
|
|
location.Malta,
|
|
location.Netherlands,
|
|
location.Poland,
|
|
location.Portugal,
|
|
location.Romania,
|
|
location.Slovenia,
|
|
location.Slovakia,
|
|
location.Spain,
|
|
location.Sweden,
|
|
}
|
|
|
|
// EeaCountriesWithoutEu defined the EEA countries.
|
|
var EeaCountriesWithoutEu = []location.CountryCode{
|
|
location.Iceland,
|
|
location.Liechtenstein,
|
|
location.Norway,
|
|
}
|