Extend Management to support peer changes distribution (#55)

* feature: add peer sync and a server public key endpoints
* test: add Management.Sync() gRpc endpoint test
* feat: implement peer sync
* docs: added some comments to the Management server
* chore: use for loop over channel when monitoring peer updates
* fix: exit infinite loop when sending updates to peers
* test: add multiple concurrent peers test for management service
* chore: remove unused test
* fix: reduce the amount peers for a concurrent peer update test

Co-authored-by: braginini <m.bragin@wiretrustee.com>
This commit is contained in:
Mikhail Bragin
2021-07-22 10:28:00 +02:00
committed by GitHub
parent d27eb317aa
commit 079d35eada
12 changed files with 974 additions and 121 deletions

View File

@@ -25,7 +25,7 @@ var (
mgmtLetsencryptDomain string
kaep = keepalive.EnforcementPolicy{
MinTime: 5 * time.Second,
MinTime: 15 * time.Second,
PermitWithoutStream: true,
}

View File

@@ -99,7 +99,7 @@ func Test_ServiceRunCMD(t *testing.T) {
}
}
func Test_ServiceStopCMD(t *testing.T) {
/*func Test_ServiceStopCMD(t *testing.T) {
b := bytes.NewBufferString("")
rootCmd.SetOut(b)
rootCmd.SetErr(b)
@@ -117,7 +117,7 @@ func Test_ServiceStopCMD(t *testing.T) {
if string(out) != expectedMSG {
t.Fatalf("expected \"%s\" got \"%s\"", expectedMSG, string(out))
}
}
}*/
func Test_ServiceUninstallCMD(t *testing.T) {
b := bytes.NewBufferString("")