From 8946bbed5bbf9dbac3f0c5ec7216ee2d1152c3ba Mon Sep 17 00:00:00 2001 From: "Cuong. Duong Manh" Date: Thu, 20 Jun 2024 17:06:29 +0700 Subject: [PATCH] [chore] update api create pool --- vngcloud/services/loadbalancer/v2/irequest.go | 1 + vngcloud/services/loadbalancer/v2/pool_requests.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/vngcloud/services/loadbalancer/v2/irequest.go b/vngcloud/services/loadbalancer/v2/irequest.go index e7bf23d..7ede18c 100644 --- a/vngcloud/services/loadbalancer/v2/irequest.go +++ b/vngcloud/services/loadbalancer/v2/irequest.go @@ -59,6 +59,7 @@ type ICreatePoolRequest interface { WithHealthMonitor(pmonitor IHealthMonitorRequest) ICreatePoolRequest WithMembers(pmembers ...IMemberRequest) ICreatePoolRequest WithLoadBalancerId(plbId string) ICreatePoolRequest + WithAlgorithm(palgorithm PoolAlgorithm) ICreatePoolRequest ToMap() map[string]interface{} GetLoadBalancerId() string ParseUserAgent() string diff --git a/vngcloud/services/loadbalancer/v2/pool_requests.go b/vngcloud/services/loadbalancer/v2/pool_requests.go index fe1e321..904ea32 100644 --- a/vngcloud/services/loadbalancer/v2/pool_requests.go +++ b/vngcloud/services/loadbalancer/v2/pool_requests.go @@ -243,6 +243,11 @@ func (s *CreatePoolRequest) ToMap() map[string]interface{} { } } +func (s *CreatePoolRequest) WithAlgorithm(palgorithm PoolAlgorithm) ICreatePoolRequest { + s.Algorithm = palgorithm + return s +} + func (s *HealthMonitor) ToRequestBody() interface{} { return s }