2021-10-25 13:27:59 +01:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
2020-05-15 15:32:28 +01:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2021-05-04 13:29:26 +01:00
|
|
|
package uploadselection
|
2020-05-15 15:32:28 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"storj.io/common/storj"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Node defines necessary information for node-selection.
|
|
|
|
type Node struct {
|
2020-05-26 14:50:28 +01:00
|
|
|
storj.NodeURL
|
2020-05-15 15:32:28 +01:00
|
|
|
LastNet string
|
|
|
|
LastIPPort string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Clone returns a deep clone of the selected node.
|
|
|
|
func (node *Node) Clone() *Node {
|
|
|
|
return &Node{
|
2020-05-26 14:50:28 +01:00
|
|
|
NodeURL: node.NodeURL,
|
2020-05-15 15:32:28 +01:00
|
|
|
LastNet: node.LastNet,
|
|
|
|
LastIPPort: node.LastIPPort,
|
|
|
|
}
|
|
|
|
}
|