2019-08-26 17:49:42 +01:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package overlay
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"storj.io/storj/pkg/identity"
|
|
|
|
"storj.io/storj/pkg/storj"
|
|
|
|
)
|
|
|
|
|
|
|
|
// PeerIdentities stores storagenode peer identities
|
2019-09-10 14:24:16 +01:00
|
|
|
//
|
|
|
|
// architecture: Database
|
2019-08-26 17:49:42 +01:00
|
|
|
type PeerIdentities interface {
|
|
|
|
// Set adds a peer identity entry for a node
|
|
|
|
Set(context.Context, storj.NodeID, *identity.PeerIdentity) error
|
|
|
|
// Get gets peer identity
|
|
|
|
Get(context.Context, storj.NodeID) (*identity.PeerIdentity, error)
|
|
|
|
// BatchGet gets all nodes peer identities in a transaction
|
|
|
|
BatchGet(context.Context, storj.NodeIDList) ([]*identity.PeerIdentity, error)
|
|
|
|
}
|