2019-08-26 17:49:42 +01:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package overlay
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2019-12-27 11:48:47 +00:00
|
|
|
"storj.io/common/identity"
|
|
|
|
"storj.io/common/storj"
|
2019-08-26 17:49:42 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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)
|
|
|
|
}
|