Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSuspensionNotification ¶ added in v1.17.1
func NewSuspensionNotification(satelliteID storj.NodeID, senderID storj.NodeID) (_ notifications.NewNotification)
NewSuspensionNotification - returns offline suspension notification.
Types ¶
type DB ¶
type DB interface { // Store inserts or updates reputation stats into the DB Store(ctx context.Context, stats Stats) error // Get retrieves stats for specific satellite Get(ctx context.Context, satelliteID storj.NodeID) (*Stats, error) // All retrieves all stats from DB All(ctx context.Context) ([]Stats, error) }
DB works with reputation database.
architecture: Database
type Metric ¶
type Metric 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"` UnknownScore float64 `json:"unknownScore"` }
Metric encapsulates storagenode reputation metrics.
type Service ¶ added in v1.17.1
type Service struct {
// contains filtered or unexported fields
}
Service is the reputation service.
architecture: Service
func NewService ¶ added in v1.17.1
func NewService(log *zap.Logger, db DB, nodeID storj.NodeID, notifications *notifications.Service) *Service
NewService creates new instance of service.
Click to show internal directories.
Click to hide internal directories.