Skip to content

Commit

Permalink
[feat] auto scale for lb
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongpiger committed Sep 30, 2024
1 parent 0f19db7 commit 503d41d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions vngcloud/services/loadbalancer/v2/irequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type ICreateLoadBalancerRequest interface {
WithPool(ppool ICreatePoolRequest) ICreateLoadBalancerRequest
WithTags(ptags ...string) ICreateLoadBalancerRequest
WithScheme(pscheme LoadBalancerScheme) ICreateLoadBalancerRequest
WithAutoScalable(pautoScalable bool) ICreateLoadBalancerRequest
WithType(ptype LoadBalancerType) ICreateLoadBalancerRequest
ParseUserAgent() string
}
Expand Down
22 changes: 14 additions & 8 deletions vngcloud/services/loadbalancer/v2/loadbalancer_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ func NewDeleteLoadBalancerByIdRequest(plbId string) IDeleteLoadBalancerByIdReque
}

type CreateLoadBalancerRequest struct {
Name string `json:"name"`
PackageID string `json:"packageId"`
Scheme LoadBalancerScheme `json:"scheme"`
SubnetID string `json:"subnetId"`
Type LoadBalancerType `json:"type"`
Listener ICreateListenerRequest `json:"listener"`
Pool ICreatePoolRequest `json:"pool"`
Tags []lscommon.Tag `json:"tags,omitempty"`
Name string `json:"name"`
PackageID string `json:"packageId"`
Scheme LoadBalancerScheme `json:"scheme"`
AutoScalable bool `json:"autoScalable"`
SubnetID string `json:"subnetId"`
Type LoadBalancerType `json:"type"`
Listener ICreateListenerRequest `json:"listener"`
Pool ICreatePoolRequest `json:"pool"`
Tags []lscommon.Tag `json:"tags,omitempty"`

lscommon.UserAgent
}
Expand Down Expand Up @@ -130,6 +131,11 @@ func (s *CreateLoadBalancerRequest) WithScheme(pscheme LoadBalancerScheme) ICrea
return s
}

func (s *CreateLoadBalancerRequest) WithAutoScalable(pautoScalable bool) ICreateLoadBalancerRequest {
s.AutoScalable = pautoScalable
return s
}

func (s *CreateLoadBalancerRequest) WithType(ptype LoadBalancerType) ICreateLoadBalancerRequest {
s.Type = ptype
return s
Expand Down

0 comments on commit 503d41d

Please sign in to comment.