2021-03-22 15:04:16 +00:00
|
|
|
/*
|
|
|
|
Package storagegroup provides features to work with information that is
|
2022-12-29 10:46:18 +00:00
|
|
|
used for proof of storage in FrostFS system.
|
2021-03-22 15:04:16 +00:00
|
|
|
|
|
|
|
StorageGroup type groups verification values for Data Audit sessions:
|
2022-08-24 14:17:40 +00:00
|
|
|
|
2021-03-22 15:04:16 +00:00
|
|
|
// receive sg info
|
|
|
|
|
|
|
|
sg.ExpirationEpoch() // expiration of the storage group
|
|
|
|
sg.Members() // objects in the group
|
|
|
|
sg.ValidationDataHash() // hash for objects validation
|
|
|
|
sg.ValidationDataSize() // total objects' payload size
|
|
|
|
|
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.storagegroup package in https://git.frostfs.info/TrueCloudLab/frostfs-api).
|
2021-03-22 15:04:16 +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/storagegroup"
|
2021-03-22 15:04:16 +00:00
|
|
|
|
|
|
|
var msg storagegroup.StorageGroup
|
|
|
|
sg.WriteToV2(&msg)
|
|
|
|
|
|
|
|
// send msg
|
|
|
|
|
|
|
|
On server side:
|
2022-08-24 14:17:40 +00:00
|
|
|
|
2021-03-22 15:04:16 +00:00
|
|
|
// recv msg
|
|
|
|
|
|
|
|
var sg StorageGroupDecimal
|
|
|
|
sg.ReadFromV2(msg)
|
|
|
|
|
|
|
|
// process sg
|
|
|
|
|
|
|
|
Using package types in an application is recommended to potentially work with
|
|
|
|
different protocol versions with which these types are compatible.
|
|
|
|
*/
|
|
|
|
package storagegroup
|