From 0d3dacb515428227d776299dea2bc5bccd978872 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Tue, 6 Jun 2023 09:28:51 +0300 Subject: [PATCH] [#73] pool: Add getters for NodeParam Signed-off-by: Denis Kirillov --- pool/pool.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pool/pool.go b/pool/pool.go index 7f4515db..d94f81bc 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -1160,16 +1160,31 @@ func (x *NodeParam) SetPriority(priority int) { x.priority = priority } +// Priority returns priority of the node. +func (x *NodeParam) Priority() int { + return x.priority +} + // SetAddress specifies address of the node. func (x *NodeParam) SetAddress(address string) { x.address = address } +// Address returns address of the node. +func (x *NodeParam) Address() string { + return x.address +} + // SetWeight specifies weight of the node. func (x *NodeParam) SetWeight(weight float64) { 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. type WaitParams struct { timeout time.Duration