Skip to content

Commit

Permalink
libnetwork/netlabel: Remove dead code
Browse files Browse the repository at this point in the history
- LocalKVProvider, LocalKVProviderURL, LocalKVProviderConfig,
  GlobalKVProvider, GlobalKVProviderURL and GlobalKVProviderConfig
  are all unused since moby/libnetwork@be2b6962 (moby/libnetwork#908).
- GlobalKVClient is unused since 781e666a and c11c2a16.
- MakeKVProvider, MakeKVProviderURL and MakeKVProviderConfig are unused
  since moby/moby@96cfb076 (moby#44683).
- MakeKVClient is unused since moby/moby@142b5229 (moby#44875).

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
  • Loading branch information
akerouanton committed Feb 16, 2023
1 parent 0815ae5 commit 07ea072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 43 deletions.
4 changes: 2 additions & 2 deletions libnetwork/drivers/overlay/overlay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
41 changes: 0 additions & 41 deletions libnetwork/netlabel/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 07ea072

Please sign in to comment.