Peer Manipulation

This commit is contained in:
mr
2026-01-26 16:29:09 +01:00
parent b35d4e2b36
commit 802786daa7
8 changed files with 98 additions and 58 deletions

View File

@@ -62,6 +62,14 @@ const (
NATIVE_TOOL = tools.NATIVE_TOOL
)
func GetMySelf() (string, error) {
return utils.GetMySelf((&peer.Peer{}).GetAccessor(&tools.APIRequest{Admin: true}))
}
func IsMySelf(peerID string) (bool, string) {
return utils.IsMySelf(peerID, (&peer.Peer{}).GetAccessor(&tools.APIRequest{Admin: true}))
}
func GenerateNodeID() (string, error) {
folderStatic := "/var/lib/opencloud-node"
if _, err := os.Stat(folderStatic); err == nil {