Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error is an error class for reputation service error. Error = errs.Class("reputation") // ErrorNoStats is an error class for reputation is not found error. ErrorNoStats = errs.Class("reputation stats not found") )
Functions ¶
This section is empty.
Types ¶
type Audit ¶
type Audit struct { TotalCount int64 `json:"totalCount"` SuccessCount int64 `json:"successCount"` Alpha float64 `json:"alpha"` Beta float64 `json:"beta"` UnknownAlpha float64 `json:"unknownAlpha"` UnknownBeta float64 `json:"unknownBeta"` Score float64 `json:"score"` SuspensionScore float64 `json:"suspensionScore"` History []AuditWindow `json:"history"` }
Audit contains audit reputation metrics.
type AuditWindow ¶
type AuditWindow struct { WindowStart time.Time `json:"windowStart"` TotalCount int32 `json:"totalCount"` OnlineCount int32 `json:"onlineCount"` }
AuditWindow contains audit count for particular time frame.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service exposes all reputation related logic.
architecture: Service
func NewService ¶
NewService creates new instance of reputation Service.
type Stats ¶
type Stats struct { NodeID storj.NodeID `json:"nodeId"` NodeName string `json:"nodeName"` Audit Audit `json:"audit"` OnlineScore float64 `json:"onlineScore"` DisqualifiedAt *time.Time `json:"disqualifiedAt"` SuspendedAt *time.Time `json:"suspendedAt"` OfflineSuspendedAt *time.Time `json:"offlineSuspendedAt"` OfflineUnderReviewAt *time.Time `json:"offlineUnderReviewAt"` VettedAt *time.Time `json:"vettedAt"` UpdatedAt time.Time `json:"updatedAt"` JoinedAt time.Time `json:"joinedAt"` }
Stats encapsulates node reputation data.
Click to show internal directories.
Click to hide internal directories.