fc905a15f7
Now that all the reverification changes have been made and the old code is out of the way, this commit renames the new things back to the old names. Mostly, this involves renaming "newContainment" to "containment" or "NewContainment" to "Containment", but there are a few other renames that have been promised and are carried out here. Refs: https://github.com/storj/storj/issues/5230 Change-Id: I34e2b857ea338acbb8421cdac18b17f2974f233c
33 lines
916 B
Go
33 lines
916 B
Go
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package audit
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zeebo/errs"
|
|
|
|
"storj.io/common/pb"
|
|
)
|
|
|
|
var (
|
|
// ContainError is the containment errs class.
|
|
ContainError = errs.Class("containment")
|
|
|
|
// ErrContainedNotFound is the errs class for when a pending audit isn't found.
|
|
ErrContainedNotFound = errs.Class("pending audit not found")
|
|
|
|
// ErrContainDelete is the errs class for when a pending audit can't be deleted.
|
|
ErrContainDelete = errs.Class("unable to delete pending audit")
|
|
)
|
|
|
|
// Containment holds information about pending audits for contained nodes.
|
|
//
|
|
// architecture: Database
|
|
type Containment interface {
|
|
Get(ctx context.Context, nodeID pb.NodeID) (*ReverificationJob, error)
|
|
Insert(ctx context.Context, job *PieceLocator) error
|
|
Delete(ctx context.Context, job *PieceLocator) (wasDeleted, nodeStillContained bool, err error)
|
|
}
|