[#73] pool: Add getters for NodeParam

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
pull/90/head
Denis Kirillov 2023-06-06 09:28:51 +03:00
parent b2e302624d
commit 0d3dacb515
1 changed files with 15 additions and 0 deletions

View File

@ -1160,16 +1160,31 @@ func (x *NodeParam) SetPriority(priority int) {
x.priority = priority x.priority = priority
} }
// Priority returns priority of the node.
func (x *NodeParam) Priority() int {
return x.priority
}
// SetAddress specifies address of the node. // SetAddress specifies address of the node.
func (x *NodeParam) SetAddress(address string) { func (x *NodeParam) SetAddress(address string) {
x.address = address x.address = address
} }
// Address returns address of the node.
func (x *NodeParam) Address() string {
return x.address
}
// SetWeight specifies weight of the node. // SetWeight specifies weight of the node.
func (x *NodeParam) SetWeight(weight float64) { func (x *NodeParam) SetWeight(weight float64) {
x.weight = weight x.weight = weight
} }
// Weight returns weight of the node.
func (x *NodeParam) Weight() float64 {
return x.weight
}
// WaitParams contains parameters used in polling is a something applied on FrostFS network. // WaitParams contains parameters used in polling is a something applied on FrostFS network.
type WaitParams struct { type WaitParams struct {
timeout time.Duration timeout time.Duration