libnetwork/netlabel: remove dead code

- LocalKVProvider, LocalKVProviderURL, LocalKVProviderConfig,
  GlobalKVProvider, GlobalKVProviderURL and GlobalKVProviderConfig
  are all unused since moby/libnetwork@be2b6962 (moby/libnetwork#908).
- GlobalKVClient is unused since 0fa873c and c8d2c6e.
- MakeKVProvider, MakeKVProviderURL and MakeKVProviderConfig are unused
  since 96cfb076 (moby/moby#44683).
- MakeKVClient is unused since 142b5229 (moby/moby#44875).

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
Albin Kerouanton 2023-02-09 17:25:32 +01:00
parent f8b5fe5724
commit 644e3d4cdb
No known key found for this signature in database
GPG key ID: 630B8E1DCBDB1864
2 changed files with 2 additions and 43 deletions

View file

@ -49,8 +49,8 @@ func setupDriver(t *testing.T) *driverTester {
}
defaultPrefix := filepath.Join(os.TempDir(), "libnetwork", "test", "overlay")
config[netlabel.GlobalKVClient] = discoverapi.DatastoreConfigData{
Scope: datastore.GlobalScope,
config[netlabel.LocalKVClient] = discoverapi.DatastoreConfigData{
Scope: datastore.LocalScope,
Provider: "boltdb",
Address: filepath.Join(defaultPrefix, filepath.Base(tmp.Name())),
Config: &store.Config{

View file

@ -47,47 +47,6 @@ const (
// HostIP is the Source-IP Address used to SNAT container traffic
HostIP = Prefix + ".host_ipv4"
// GlobalKVProvider constant represents the KV provider backend
GlobalKVProvider = DriverPrivatePrefix + "globalkv_provider"
// GlobalKVProviderURL constant represents the KV provider URL
GlobalKVProviderURL = DriverPrivatePrefix + "globalkv_provider_url"
// GlobalKVProviderConfig constant represents the KV provider Config
GlobalKVProviderConfig = DriverPrivatePrefix + "globalkv_provider_config"
// GlobalKVClient constants represents the global kv store client
GlobalKVClient = DriverPrivatePrefix + "globalkv_client"
// LocalKVProvider constant represents the KV provider backend
LocalKVProvider = DriverPrivatePrefix + "localkv_provider"
// LocalKVProviderURL constant represents the KV provider URL
LocalKVProviderURL = DriverPrivatePrefix + "localkv_provider_url"
// LocalKVProviderConfig constant represents the KV provider Config
LocalKVProviderConfig = DriverPrivatePrefix + "localkv_provider_config"
// LocalKVClient constants represents the local kv store client
LocalKVClient = DriverPrivatePrefix + "localkv_client"
)
// MakeKVProvider returns the kvprovider label for the scope
func MakeKVProvider(scope string) string {
return DriverPrivatePrefix + scope + "kv_provider"
}
// MakeKVProviderURL returns the kvprovider url label for the scope
func MakeKVProviderURL(scope string) string {
return DriverPrivatePrefix + scope + "kv_provider_url"
}
// MakeKVProviderConfig returns the kvprovider config label for the scope
func MakeKVProviderConfig(scope string) string {
return DriverPrivatePrefix + scope + "kv_provider_config"
}
// MakeKVClient returns the kv client label for the scope
func MakeKVClient(scope string) string {
return DriverPrivatePrefix + scope + "kv_client"
}