Browse code

Merge pull request #51477 from thaJeztah/discovery_enum

libnetwork/discoverapi: use DiscoveryType for enum

Sebastiaan van Stijn authored on 2025/11/11 23:01:25
Showing 1 changed files
... ...
@@ -14,12 +14,9 @@ type Discover interface {
14 14
 type DiscoveryType int
15 15
 
16 16
 const (
17
-	// NodeDiscovery represents Node join/leave events provided by discovery
18
-	NodeDiscovery = iota + 1
19
-	// EncryptionKeysConfig represents the initial key(s) for performing datapath encryption
20
-	EncryptionKeysConfig
21
-	// EncryptionKeysUpdate represents an update to the datapath encryption key(s)
22
-	EncryptionKeysUpdate
17
+	NodeDiscovery        DiscoveryType = 1 // NodeDiscovery represents Node join/leave events provided by discovery.
18
+	EncryptionKeysConfig DiscoveryType = 2 // EncryptionKeysConfig represents the initial key(s) for performing datapath encryption.
19
+	EncryptionKeysUpdate DiscoveryType = 3 // EncryptionKeysUpdate represents an update to the datapath encryption key(s).
23 20
 )
24 21
 
25 22
 // NodeDiscoveryData represents the structure backing the node discovery data json string