2022-06-30 16:08:34 +00:00
|
|
|
/*
|
2022-12-29 10:46:18 +00:00
|
|
|
Package reputation collects functionality related to the FrostFS reputation system.
|
2022-06-30 16:08:34 +00:00
|
|
|
|
2022-12-29 10:46:18 +00:00
|
|
|
The functionality is based on the system described in the FrostFS specification.
|
2022-06-30 16:08:34 +00:00
|
|
|
|
|
|
|
Trust type represents simple instances of trust values. PeerToPeerTrust extends
|
|
|
|
Trust to support the direction of trust, i.e. from whom to whom. GlobalTrust
|
|
|
|
is designed as a global measure of trust in a network member. See the docs
|
|
|
|
for each type for details.
|
|
|
|
|
2022-12-29 10:46:18 +00:00
|
|
|
Instances can be also used to process FrostFS API V2 protocol messages
|
2023-03-07 11:20:03 +00:00
|
|
|
(see neo.fs.v2.reputation package in https://git.frostfs.info/TrueCloudLab/frostfs-api).
|
2022-06-30 16:08:34 +00:00
|
|
|
|
|
|
|
On client side:
|
2022-08-24 14:17:40 +00:00
|
|
|
|
2023-03-07 11:20:03 +00:00
|
|
|
import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation"
|
2022-06-30 16:08:34 +00:00
|
|
|
|
|
|
|
var msg reputation.GlobalTrust
|
|
|
|
trust.WriteToV2(&msg)
|
|
|
|
|
|
|
|
// send trust
|
|
|
|
|
|
|
|
On server side:
|
2022-08-24 14:17:40 +00:00
|
|
|
|
2022-06-30 16:08:34 +00:00
|
|
|
// recv msg
|
|
|
|
|
|
|
|
var trust reputation.GlobalTrust
|
|
|
|
trust.ReadFromV2(msg)
|
|
|
|
|
|
|
|
// process trust
|
|
|
|
|
|
|
|
Using package types in an application is recommended to potentially work with
|
|
|
|
different protocol versions with which these types are compatible.
|
|
|
|
*/
|
|
|
|
package reputation
|