1// Copyright (C) 2020 Storj Labs, Inc.
2// See LICENSE for copying information.
3
4package uploadselection
5
6import (
7	"storj.io/common/storj"
8	"storj.io/common/storj/location"
9)
10
11// Node defines necessary information for node-selection.
12type Node struct {
13	storj.NodeURL
14	LastNet     string
15	LastIPPort  string
16	CountryCode location.CountryCode
17}
18
19// Clone returns a deep clone of the selected node.
20func (node *Node) Clone() *Node {
21	return &Node{
22		NodeURL:     node.NodeURL,
23		LastNet:     node.LastNet,
24		LastIPPort:  node.LastIPPort,
25		CountryCode: node.CountryCode,
26	}
27}
28