[#73] pool: Add getters for NodeParam
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
b2e302624d
commit
0d3dacb515
1 changed files with 15 additions and 0 deletions
15
pool/pool.go
15
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
|
||||
|
|
Loading…
Reference in a new issue