2020-05-15 15:32:28 +01:00
|
|
|
// Copyright (C) 2020 Storj Labs, Incache.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package nodeselection
|
|
|
|
|
|
|
|
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,
|
|
|
|
}
|
|
|
|
}
|