Documentation ¶
Index ¶
- type Result
- func (r *Result) AuditEpoch() uint64
- func (r *Result) Complete() bool
- func (r *Result) ContainerID() *cid.ID
- func (r *Result) Fail() uint32
- func (r *Result) FailNodes() [][]byte
- func (r *Result) FailSG() []*object.ID
- func (r *Result) Hit() uint32
- func (r *Result) Marshal(b ...[]byte) ([]byte, error)
- func (r *Result) MarshalJSON() ([]byte, error)
- func (r *Result) Miss() uint32
- func (r *Result) PassNodes() [][]byte
- func (r *Result) PassSG() []*object.ID
- func (r *Result) PublicKey() []byte
- func (r *Result) Requests() uint32
- func (r *Result) Retries() uint32
- func (r *Result) SetAuditEpoch(epoch uint64)
- func (r *Result) SetComplete(v bool)
- func (r *Result) SetContainerID(id *cid.ID)
- func (r *Result) SetFail(fail uint32)
- func (r *Result) SetFailNodes(list [][]byte)
- func (r *Result) SetFailSG(list []*object.ID)
- func (r *Result) SetHit(hit uint32)
- func (r *Result) SetMiss(miss uint32)
- func (r *Result) SetPassNodes(list [][]byte)
- func (r *Result) SetPassSG(list []*object.ID)
- func (r *Result) SetPublicKey(key []byte)
- func (r *Result) SetRequests(v uint32)
- func (r *Result) SetRetries(v uint32)
- func (r *Result) SetVersion(v *pkg.Version)
- func (r *Result) ToV2() *audit.DataAuditResult
- func (r *Result) Unmarshal(data []byte) error
- func (r *Result) UnmarshalJSON(data []byte) error
- func (r *Result) Version() *pkg.Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result audit.DataAuditResult
Result represents v2-compatible data audit result.
func NewResult ¶
func NewResult() *Result
New creates and initializes blank Result.
Defaults:
- version: pkg.SDKVersion();
- complete: false;
- cid: nil;
- pubKey: nil;
- passSG, failSG: nil;
- failNodes, passNodes: nil;
- hit, miss, fail: 0;
- requests, retries: 0;
- auditEpoch: 0.
func NewResultFromV2 ¶
func NewResultFromV2(aV2 *audit.DataAuditResult) *Result
NewFromV2 wraps v2 DataAuditResult message to Result.
Nil audit.DataAuditResult converts to nil.
func (*Result) AuditEpoch ¶
AuditEpoch returns epoch number when the Data Audit was conducted.
func (*Result) ContainerID ¶
ContainerID returns container under audit.
func (*Result) Fail ¶
Fail returns number of sampled objects under audit stored in a way not confirming placement policy or not found at all when checking PoP.
func (*Result) FailNodes ¶
FailNodes returns list of storage node public keys that failed at least one PDP.
func (*Result) Hit ¶
Hit returns number of sampled objects under audit placed in an optimal way according to the containers placement policy when checking PoP.
func (*Result) Marshal ¶
Marshal marshals Result into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (*Result) MarshalJSON ¶
MarshalJSON encodes Result to protobuf JSON format.
func (*Result) Miss ¶
Miss returns number of sampled objects under audit placed in suboptimal way according to the containers placement policy, but still at a satisfactory level when checking PoP.
func (*Result) PassNodes ¶
PassNodes returns list of storage node public keys that passed at least one PDP.
func (*Result) PublicKey ¶
PublicKey returns public key of the auditing InnerRing node in a binary format.
func (*Result) Requests ¶
Requests returns number of requests made by PoR audit check to get all headers of the objects inside storage groups.
func (*Result) Retries ¶
Retries returns number of retries made by PoR audit check to get all headers of the objects inside storage groups.
func (*Result) SetAuditEpoch ¶
SetAuditEpoch sets epoch number when the Data Audit was conducted.
func (*Result) SetComplete ¶
SetComplete sets completion state of audit result.
func (*Result) SetContainerID ¶
SetContainerID sets container under audit.
func (*Result) SetFail ¶
SetFail sets number of sampled objects under audit stored in a way not confirming placement policy or not found at all when checking PoP.
func (*Result) SetFailNodes ¶
SetFailNodes sets list of storage node public keys that failed at least one PDP.
func (*Result) SetHit ¶
SetHit sets number of sampled objects under audit placed in an optimal way according to the containers placement policy when checking PoP.
func (*Result) SetMiss ¶
SetMiss sets number of sampled objects under audit placed in suboptimal way according to the containers placement policy, but still at a satisfactory level when checking PoP.
func (*Result) SetPassNodes ¶
SetPassNodes sets list of storage node public keys that passed at least one PDP.
func (*Result) SetPublicKey ¶
SetPublicKey sets public key of the auditing InnerRing node in a binary format.
func (*Result) SetRequests ¶
SetRequests sets number of requests made by PoR audit check to get all headers of the objects inside storage groups.
func (*Result) SetRetries ¶
SetRetries sets number of retries made by PoR audit check to get all headers of the objects inside storage groups.
func (*Result) SetVersion ¶
SetVersion sets Data Audit structure version.
func (*Result) ToV2 ¶
func (r *Result) ToV2() *audit.DataAuditResult
ToV2 converts Result to v2 DataAuditResult message.
Nil Result converts to nil.
func (*Result) UnmarshalJSON ¶
UnmarshalJSON decodes Result from protobuf JSON format.