-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement client wrapper around discovery service API
Fixes #6 This wrapper handles protobuf marshaling, encryption, etc. on the client data so that service doesn't have a way to see the data. Client handles data refresh on TTL, updates, discovery of other affiliates, etc. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
- Loading branch information
Showing
17 changed files
with
2,869 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
syntax = "proto3"; | ||
|
||
package sidero.discovery.client; | ||
|
||
option go_package = "github.com/talos-systems/api/v1alpha1/client/pb"; | ||
|
||
// Affiliate protobuf spec, as seen internally in the client code. | ||
// | ||
// Discovery service recieves Affiliate marshaled to protobuf and encrypted. | ||
message Affiliate { | ||
string node_id = 1; | ||
// IPs are encoded using binary marshaling. | ||
repeated bytes addresses = 2; | ||
string hostname = 3; | ||
string nodename = 4; | ||
string machine_type = 5; | ||
string operating_system = 6; | ||
optional KubeSpan kubespan = 7; | ||
} | ||
|
||
// KubeSpan optional configuration. | ||
message KubeSpan { | ||
string public_key = 1; | ||
bytes address = 2; | ||
repeated IPPrefix additional_addresses = 3; | ||
} | ||
|
||
// IPPrefix contains CIDR. | ||
message IPPrefix { | ||
// IPs are encoded using binary marshaling. | ||
bytes ip = 1; | ||
uint32 bits = 2; | ||
} | ||
|
||
// Endpoint for the Affiliate KubeSpan spec as seen internally in the client code. | ||
// | ||
// Discovery service receives Affiliate marshaled to protobuf and encrypted. | ||
message Endpoint { | ||
// IPs are encoded using binary marshaling. | ||
bytes ip = 1; | ||
uint32 port = 2; | ||
} |
Oops, something went wrong.