This commit is contained in:
stSolo
2023-03-01 19:05:53 +03:00
parent de12bc2acc
commit 42800ac4fe
573 changed files with 2077 additions and 1844 deletions

View File

@@ -11,11 +11,11 @@ import (
type BackendCreateRequest struct {
// ID of the load balancer instance to backendCreate
// Required: true
LBID uint64 `url:"lbId"`
LBID uint64 `url:"lbId" json:"lbId"`
// Must be unique among all backends of this load balancer - name of the new backend to create
// Required: true
BackendName string `url:"backendName"`
BackendName string `url:"backendName" json:"backendName"`
// Algorithm
// Should be one of:
@@ -23,47 +23,47 @@ type BackendCreateRequest struct {
// - static-rr
// - leastconn
// Required: false
Algorithm string `url:"algorithm,omitempty"`
Algorithm string `url:"algorithm,omitempty" json:"algorithm,omitempty"`
// Interval in milliseconds between two consecutive availability
// checks of the server that is considered available
// Required: false
Inter uint64 `url:"inter,omitempty"`
Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"`
// Interval in milliseconds between two consecutive checks to
// restore the availability of a server that is currently considered unavailable
// Required: false
DownInter uint64 `url:"downinter,omitempty"`
DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"`
// Number of checks that the server must pass in order to get the available status
// and be included in the balancing scheme again
// Required: false
Rise uint64 `url:"rise,omitempty"`
Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"`
// Number of consecutive failed availability checks,
// after which the previously considered available server receives the status of
// unavailable and is temporarily excluded from the balancing scheme
// Required: false
Fall uint64 `url:"fall,omitempty"`
Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"`
// Interval in milliseconds from the moment the server receives the available status,
// after which the number of actually allowed connections to this server will be returned to 100% of the set limit
// Required: false
SlowStart uint64 `url:"slowstart,omitempty"`
SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"`
// Limit of simultaneous connections to the server. When this limit is reached,
// the server is temporarily excluded from the balancing scheme
// Required: false
MaxConn uint64 `url:"maxconn,omitempty"`
MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"`
// Limit of connections waiting in the queue.
// When this limit is reached, all subsequent connections will be forwarded to other servers
// Required: false
MaxQueue uint64 `url:"maxqueue,omitempty"`
MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"`
// Server weight for use in weight balancing algorithms
// Required: false
Weight uint64 `url:"weight,omitempty"`
Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"`
}
func (lbrq BackendCreateRequest) validate() error {