5d0816430f
* rename pkg/linksharing to linksharing * rename pkg/httpserver to linksharing/httpserver * rename pkg/eestream to uplink/eestream * rename pkg/stream to uplink/stream * rename pkg/metainfo/kvmetainfo to uplink/metainfo/kvmetainfo * rename pkg/auth/signing to pkg/signing * rename pkg/storage to uplink/storage * rename pkg/accounting to satellite/accounting * rename pkg/audit to satellite/audit * rename pkg/certdb to satellite/certdb * rename pkg/discovery to satellite/discovery * rename pkg/overlay to satellite/overlay * rename pkg/datarepair to satellite/repair
23 lines
853 B
Go
23 lines
853 B
Go
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package irreparable
|
|
|
|
import (
|
|
"context"
|
|
|
|
"storj.io/storj/pkg/pb"
|
|
)
|
|
|
|
// DB stores information about repairs that have failed.
|
|
type DB interface {
|
|
// IncrementRepairAttempts increments the repair attempts.
|
|
IncrementRepairAttempts(ctx context.Context, segmentInfo *pb.IrreparableSegment) error
|
|
// Get returns irreparable segment info based on segmentPath.
|
|
Get(ctx context.Context, segmentPath []byte) (*pb.IrreparableSegment, error)
|
|
// GetLimited returns a list of irreparable segment info starting after the last segment info we retrieved
|
|
GetLimited(ctx context.Context, limit int, lastSeenSegmentPath []byte) ([]*pb.IrreparableSegment, error)
|
|
// Delete removes irreparable segment info based on segmentPath.
|
|
Delete(ctx context.Context, segmentPath []byte) error
|
|
}
|