Optimize process checks database read (#2182)

* Add posture checks to peer management

This commit includes posture checks to the peer management logic. The AddPeer, SyncPeer and LoginPeer functions now return a list of posture checks along with the peer and network map.

* Update peer methods to return posture checks

* Refactor

* return early if there is no posture checks

---------

Co-authored-by: Maycon Santos <mlsmaycon@gmail.com>
This commit is contained in:
Bethuel Mmbaga
2024-06-22 17:41:16 +03:00
committed by GitHub
parent 25723e9b07
commit eaa31c2dc6
9 changed files with 127 additions and 147 deletions

View File

@ -851,11 +851,11 @@ func initTestNSAccount(t *testing.T, am *DefaultAccountManager) (*Account, error
return nil, err
}
_, _, err = am.AddPeer("", userID, peer1)
_, _, _, err = am.AddPeer("", userID, peer1)
if err != nil {
return nil, err
}
_, _, err = am.AddPeer("", userID, peer2)
_, _, _, err = am.AddPeer("", userID, peer2)
if err != nil {
return nil, err
}