9bdcc415bc
Closes https://github.com/storj/storj/issues/4242 Change-Id: Ieda59a4f37c673e4e81abb4c89c09daf3199bbc7
28 lines
574 B
Go
28 lines
574 B
Go
// Copyright (C) 2020 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package uploadselection
|
|
|
|
import (
|
|
"storj.io/common/storj"
|
|
"storj.io/common/storj/location"
|
|
)
|
|
|
|
// Node defines necessary information for node-selection.
|
|
type Node struct {
|
|
storj.NodeURL
|
|
LastNet string
|
|
LastIPPort string
|
|
CountryCode location.CountryCode
|
|
}
|
|
|
|
// 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,
|
|
CountryCode: node.CountryCode,
|
|
}
|
|
}
|