d2033c2f52
Currently nodeselection package only contained state for uploads, move these to a subpackage, such that we can make another "downloadselection" for downloads. Then move selection logic from overlay to nodeselection. Change-Id: I0fc42bcae3a29db2728dae9f3863b1e95bf5165b
25 lines
472 B
Go
25 lines
472 B
Go
// Copyright (C) 2020 Storj Labs, Incache.
|
|
// See LICENSE for copying information.
|
|
|
|
package uploadselection
|
|
|
|
import (
|
|
"storj.io/common/storj"
|
|
)
|
|
|
|
// Node defines necessary information for node-selection.
|
|
type Node struct {
|
|
storj.NodeURL
|
|
LastNet string
|
|
LastIPPort string
|
|
}
|
|
|
|
// Clone returns a deep clone of the selected node.
|
|
func (node *Node) Clone() *Node {
|
|
return &Node{
|
|
NodeURL: node.NodeURL,
|
|
LastNet: node.LastNet,
|
|
LastIPPort: node.LastIPPort,
|
|
}
|
|
}
|