audit

package
v1.0.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

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: version.Current();
  • 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

func (r *Result) AuditEpoch() uint64

AuditEpoch returns epoch number when the Data Audit was conducted.

func (*Result) Complete

func (r *Result) Complete() bool

Complete returns completion state of audit result.

func (*Result) ContainerID

func (r *Result) ContainerID() *cid.ID

ContainerID returns container under audit.

func (*Result) Fail

func (r *Result) Fail() uint32

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

func (r *Result) FailNodes() [][]byte

FailNodes returns list of storage node public keys that failed at least one PDP.

func (*Result) FailSG

func (r *Result) FailSG() []*oid.ID

FailSG returns list of Storage Groups that failed audit PoR stage.

func (*Result) Hit

func (r *Result) Hit() uint32

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

func (r *Result) Marshal() ([]byte, error)

Marshal marshals Result into a protobuf binary form.

func (*Result) MarshalJSON

func (r *Result) MarshalJSON() ([]byte, error)

MarshalJSON encodes Result to protobuf JSON format.

func (*Result) Miss

func (r *Result) Miss() uint32

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

func (r *Result) PassNodes() [][]byte

PassNodes returns list of storage node public keys that passed at least one PDP.

func (*Result) PassSG

func (r *Result) PassSG() []*oid.ID

PassSG returns list of Storage Groups that passed audit PoR stage.

func (*Result) PublicKey

func (r *Result) PublicKey() []byte

PublicKey returns public key of the auditing InnerRing node in a binary format.

func (*Result) Requests

func (r *Result) Requests() uint32

Requests returns number of requests made by PoR audit check to get all headers of the objects inside storage groups.

func (*Result) Retries

func (r *Result) Retries() uint32

Retries returns number of retries made by PoR audit check to get all headers of the objects inside storage groups.

func (*Result) SetAuditEpoch

func (r *Result) SetAuditEpoch(epoch uint64)

SetAuditEpoch sets epoch number when the Data Audit was conducted.

func (*Result) SetComplete

func (r *Result) SetComplete(v bool)

SetComplete sets completion state of audit result.

func (*Result) SetContainerID

func (r *Result) SetContainerID(id *cid.ID)

SetContainerID sets container under audit.

func (*Result) SetFail

func (r *Result) SetFail(fail uint32)

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

func (r *Result) SetFailNodes(list [][]byte)

SetFailNodes sets list of storage node public keys that failed at least one PDP.

func (*Result) SetFailSG

func (r *Result) SetFailSG(list []*oid.ID)

SetFailSG sets list of Storage Groups that failed audit PoR stage.

func (*Result) SetHit

func (r *Result) SetHit(hit uint32)

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

func (r *Result) SetMiss(miss uint32)

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

func (r *Result) SetPassNodes(list [][]byte)

SetPassNodes sets list of storage node public keys that passed at least one PDP.

func (*Result) SetPassSG

func (r *Result) SetPassSG(list []*oid.ID)

SetPassSG sets list of Storage Groups that passed audit PoR stage.

func (*Result) SetPublicKey

func (r *Result) SetPublicKey(key []byte)

SetPublicKey sets public key of the auditing InnerRing node in a binary format.

func (*Result) SetRequests

func (r *Result) SetRequests(v uint32)

SetRequests sets number of requests made by PoR audit check to get all headers of the objects inside storage groups.

func (*Result) SetRetries

func (r *Result) SetRetries(v uint32)

SetRetries sets number of retries made by PoR audit check to get all headers of the objects inside storage groups.

func (*Result) SetVersion

func (r *Result) SetVersion(v *version.Version)

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) Unmarshal

func (r *Result) Unmarshal(data []byte) error

Unmarshal unmarshals protobuf binary representation of Result.

func (*Result) UnmarshalJSON

func (r *Result) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes Result from protobuf JSON format.

func (*Result) Version

func (r *Result) Version() *version.Version

Version returns Data Audit structure version.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL