Documentation
¶
Overview ¶
API to manage load balancer instance
Index ¶
- type BackendCreateRequest
- type BackendDeleteRequest
- type BackendServerAddRequest
- type BackendServerDeleteRequest
- type BackendServerUpdateRequest
- type BackendUpdateRequest
- type ConfigResetRequest
- type CreateRequest
- type DeleteRequest
- type DisableRequest
- type EnableRequest
- type FrontendBindDeleteRequest
- type FrontendBindRequest
- type FrontendBindUpdateRequest
- type FrontendCreateRequest
- type FrontendDeleteRequest
- type GetRequest
- type HighlyAvailableRequest
- type ItemBackend
- type ItemBinding
- type ItemFrontend
- type ItemLBList
- type ItemServer
- type LB
- func (lb LB) BackendCreate(ctx context.Context, req BackendCreateRequest) (bool, error)
- func (lb LB) BackendDelete(ctx context.Context, req BackendDeleteRequest) (bool, error)
- func (lb LB) BackendServerAdd(ctx context.Context, req BackendServerAddRequest) (bool, error)
- func (lb LB) BackendServerDelete(ctx context.Context, req BackendServerDeleteRequest) (bool, error)
- func (lb LB) BackendServerUpdate(ctx context.Context, req BackendServerUpdateRequest) (bool, error)
- func (lb LB) BackendUpdate(ctx context.Context, req BackendUpdateRequest) (bool, error)
- func (lb LB) ConfigReset(ctx context.Context, req ConfigResetRequest) (bool, error)
- func (lb LB) Create(ctx context.Context, req CreateRequest) (uint64, error)
- func (lb LB) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (lb LB) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (lb LB) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (lb LB) FrontendBind(ctx context.Context, req FrontendBindRequest) (bool, error)
- func (lb LB) FrontendBindDelete(ctx context.Context, req FrontendBindDeleteRequest) (bool, error)
- func (lb LB) FrontendBindUpdate(ctx context.Context, req FrontendBindUpdateRequest) (bool, error)
- func (l LB) FrontendCreate(ctx context.Context, req FrontendCreateRequest) (bool, error)
- func (lb LB) FrontendDelete(ctx context.Context, req FrontendDeleteRequest) (bool, error)
- func (lb LB) Get(ctx context.Context, req GetRequest) (*RecordLB, error)
- func (lb LB) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)
- func (l LB) HighlyAvailable(ctx context.Context, req HighlyAvailableRequest) (bool, error)
- func (lb LB) List(ctx context.Context, req ListRequest) (*ListLB, error)
- func (lb LB) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListLB, error)
- func (lb LB) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)
- func (lb LB) Restart(ctx context.Context, req RestartRequest) (bool, error)
- func (lb LB) Restore(ctx context.Context, req RestoreRequest) (bool, error)
- func (lb LB) Start(ctx context.Context, req StartRequest) (bool, error)
- func (lb LB) Stop(ctx context.Context, req StopRequest) (bool, error)
- func (lb LB) Update(ctx context.Context, req UpdateRequest) (bool, error)
- func (l LB) UpdateSysctParams(ctx context.Context, req UpdateSysctParamsRequest) (bool, error)
- type ListBackends
- type ListBindings
- type ListDeletedRequest
- type ListFrontends
- type ListLB
- func (ll ListLB) FilterByExtNetID(extNetID uint64) ListLB
- func (ll ListLB) FilterByID(id uint64) ListLB
- func (ll ListLB) FilterByK8SID(ctx context.Context, k8sID uint64, decortClient interfaces.Caller) (*ListLB, error)
- func (ll ListLB) FilterByName(name string) ListLB
- func (ll ListLB) FilterFunc(predicate func(ItemLBList) bool) ListLB
- func (ll ListLB) FindOne() ItemLBList
- func (ll ListLB) Serialize(params ...string) (serialization.Serialized, error)
- func (ll ListLB) SortByCreatedTime(inverse bool) ListLB
- func (ll ListLB) SortByDeletedTime(inverse bool) ListLB
- func (ll ListLB) SortByUpdatedTime(inverse bool) ListLB
- type ListRequest
- type ListServers
- type Node
- type Params
- type RecordLB
- type RestartRequest
- type RestoreRequest
- type ServerSettings
- type StartRequest
- type StopRequest
- type UpdateRequest
- type UpdateSysctParamsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendCreateRequest ¶
type BackendCreateRequest struct { // ID of the load balancer instance to backendCreate // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Must be unique among all backends of this load balancer - name of the new backend to create // Required: true BackendName string `url:"backendName" json:"backendName" validate:"required"` // Algorithm // Should be one of: // - roundrobin // - static-rr // - leastconn // Required: false Algorithm string `url:"algorithm,omitempty" json:"algorithm,omitempty" validate:"omitempty,lbAlgorithm"` // Interval in milliseconds between two consecutive availability // checks of the server that is considered available // Required: false 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" 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" 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" 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" 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" 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" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` }
Request struct for create backend
type BackendDeleteRequest ¶
type BackendDeleteRequest struct { // ID of the load balancer instance to BackendDelete // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Cannot be emtpy string - name of the backend to delete // Required: true BackendName string `url:"backendName" json:"backendName" validate:"required"` }
Request struct for delete backend
type BackendServerAddRequest ¶
type BackendServerAddRequest struct { // ID of the load balancer instance to BackendServerAdd // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Must match one of the existing backens - name of the backend to add servers to // Required: true BackendName string `url:"backendName" json:"backendName" validate:"required"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true ServerName string `url:"serverName" json:"serverName" validate:"required"` // IP address of the server // Required: true Address string `url:"address" json:"address" validate:"required"` // Port number on the server // Required: true Port uint64 `url:"port" json:"port" validate:"required"` // Set to disabled if this server should be used regardless of its state // Required: false Check string `url:"check,omitempty" json:"check,omitempty"` // Interval in milliseconds between two consecutive availability checks of the server that is considered available // Required: false 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" 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" 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" 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" 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" 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" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` }
Request struct for add server definition to the backend
type BackendServerDeleteRequest ¶
type BackendServerDeleteRequest struct { // ID of the load balancer instance to BackendServerDelete // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Must match one of the existing backens - name of the backend to add servers to // Required: true BackendName string `url:"backendName" json:"backendName" validate:"required"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true ServerName string `url:"serverName" json:"serverName" validate:"required"` }
Request struct for delete server definition
type BackendServerUpdateRequest ¶
type BackendServerUpdateRequest struct { // ID of the load balancer instance to BackendServerAdd // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Must match one of the existing backens - name of the backend to add servers to // Required: true BackendName string `url:"backendName" json:"backendName" validate:"required"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true ServerName string `url:"serverName" json:"serverName" validate:"required"` // IP address of the server // Required: true Address string `url:"address" json:"address" validate:"required"` // Port number on the server // Required: true Port uint64 `url:"port" json:"port" validate:"required"` // Set to disabled if this server should be used regardless of its state // Required: false Check string `url:"check,omitempty" json:"check,omitempty"` // Interval in milliseconds between two consecutive availability checks of the server that is considered available // Required: false 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" 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" 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" 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" 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" 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" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` }
Request struct for update server
type BackendUpdateRequest ¶
type BackendUpdateRequest struct { // ID of the load balancer instance to backendCreate // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Must be unique among all backends of this load balancer - name of the new backend to create // Required: true BackendName string `url:"backendName" json:"backendName" validate:"required"` // Algorithm // Should be one of: // - roundrobin // - static-rr // - leastconn // Required: false Algorithm string `url:"algorithm,omitempty" json:"algorithm,omitempty" validate:"omitempty,lbAlgorithm"` // Interval in milliseconds between two consecutive availability // checks of the server that is considered available // Required: false 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" 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" 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" 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" 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" 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" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` }
Request struct for update backend
type ConfigResetRequest ¶
type ConfigResetRequest struct { // ID of the load balancer instance to ConfigReset // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
Request struct for reset config
type CreateRequest ¶
type CreateRequest struct { // ID of the resource group where this load balancer instance will be located // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Name of the load balancer. // Must be unique among all load balancers in this resource group // Required: true Name string `url:"name" json:"name" validate:"required"` // External network to connect this load balancer to // Required: false ExtNetID uint64 `url:"extnetId" json:"extnetId"` // Internal network (VINS) to connect this load balancer to // Required: false VINSID uint64 `url:"vinsId" json:"vinsId"` // Custom sysctl values for Load Balancer instance. Applied on boot // Required: false SysctlParams Params `url:"-" json:"sysctlParams,omitempty" validate:"omitempty,dive"` // Use Highly Available schema for LB deploy // Required: false HighlyAvailable bool `url:"highlyAvailable,omitempty" json:"highlyAvailable,omitempty"` // Start now Load balancer // Required: false Start bool `url:"start" json:"start"` // Text description of this load balancer // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` }
Request struct for create load balancer
type DeleteRequest ¶
type DeleteRequest struct { // ID of the load balancer instance to delete // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Set to true to delete load balancer immediately bypassing recycle bin // Required: false Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` }
Request struct for delete load balancer
type DisableRequest ¶
type DisableRequest struct { // ID of the load balancer instance to disable // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
Request struct for disable load balancer
type EnableRequest ¶
type EnableRequest struct { // ID of the load balancer instance to enable // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
Request struct for enable load balancer
type FrontendBindDeleteRequest ¶
type FrontendBindDeleteRequest struct { // ID of the load balancer instance to FrontendBindDelete // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Name of the frontend to delete // Required: true FrontendName string `url:"frontendName" json:"frontendName" validate:"required"` // Name of the binding to delete // Required: true BindingName string `url:"bindingName" json:"bindingName" validate:"required"` }
Request struct for delete bind
type FrontendBindRequest ¶
type FrontendBindRequest struct { // ID of the load balancer instance to FrontendBind // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Name of the frontend to update // Required: true FrontendName string `url:"frontendName" json:"frontendName" validate:"required"` // Name of the binding to update // Required: true BindingName string `url:"bindingName" json:"bindingName" validate:"required"` // If specified must be within the IP range of either Ext Net or ViNS, // where this load balancer is connected - new IP address to use for this binding. // If omitted, current IP address is retained // Required: true BindingAddress string `url:"bindingAddress" json:"bindingAddress" validate:"required"` // New port number to use for this binding. // If omitted, current port number is retained // Required: true BindingPort uint64 `url:"bindingPort" json:"bindingPort" validate:"required"` }
Request struct for frontend bind
type FrontendBindUpdateRequest ¶
type FrontendBindUpdateRequest struct { // ID of the load balancer instance to FrontendBindUpdate // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Name of the frontend to update // Required: true FrontendName string `url:"frontendName" json:"frontendName" validate:"required"` // Name of the binding to update // Required: true BindingName string `url:"bindingName" json:"bindingName" validate:"required"` // If specified must be within the IP range of either Ext Net or ViNS, // where this load balancer is connected - new IP address to use for this binding. // If omitted, current IP address is retained // Required: true BindingAddress string `url:"bindingAddress" json:"bindingAddress" validate:"required"` // New port number to use for this binding. // If omitted, current port number is retained // Required: true BindingPort uint64 `url:"bindingPort" json:"bindingPort" validate:"required"` }
Request struct for update binding
type FrontendCreateRequest ¶
type FrontendCreateRequest struct { // ID of the load balancer instance to FrontendCreate // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Must be unique among all frontends of // this load balancer - name of the new frontend to create // Required: true FrontendName string `url:"frontendName" json:"frontendName" validate:"required"` // Should be one of the backends existing on // this load balancer - name of the backend to use // Required: true BackendName string `url:"backendName" json:"backendName" validate:"required"` }
Request struct for create frontend
type FrontendDeleteRequest ¶
type FrontendDeleteRequest struct { // ID of the load balancer instance to FrontendDelete // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Name of the frontend to delete // Required: true FrontendName string `url:"frontendName" json:"frontendName" validate:"required"` }
Request struct for delete frontend
type GetRequest ¶
type GetRequest struct { // ID of the load balancer to get details for // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
GetRequest struct to get detailed information about load balancer
type HighlyAvailableRequest ¶ added in v1.6.0
type HighlyAvailableRequest struct { // ID of the LB instance // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
Request struct for make Load Balancer Highly available
type ItemBackend ¶
type ItemBackend struct { // Algorithm Algorithm string `json:"algorithm"` // GUID GUID string `json:"guid"` // Name Name string `json:"name"` // Server settings ServerDefaultSettings ServerSettings `json:"serverDefaultSettings"` // List of servers Servers ListServers `json:"servers"` }
Main information about backend
type ItemBinding ¶
type ItemBinding struct { // Address Address string `json:"address"` // GUID GUID string `json:"guid"` // Name Name string `json:"name"` // Port Port uint64 `json:"port"` }
Main information about bindings
type ItemFrontend ¶
type ItemFrontend struct { // Backend Backend string `json:"backend"` // List of bindings Bindings ListBindings `json:"bindings"` // GUID GUID string `json:"guid"` // Name Name string `json:"name"` }
Main information about frontend
type ItemLBList ¶ added in v1.5.6
type ItemLBList struct { // HAMode HAMode bool `json:"HAmode"` // Access Control List ACL interface{} `json:"acl"` // BackendHAIP BackendHAIP string `json:"backendHAIP"` // List of load balancer backends Backends ListBackends `json:"backends"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // Deleted by DeletedBy string `json:"deletedBy"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // Description Description string `json:"desc"` // DPAPI password DPAPIPassword string `json:"dpApiPassword"` // DPAPI user DPAPIUser string `json:"dpApiUser"` // External network ID ExtNetID uint64 `json:"extnetId"` // FrontendHAIP FrontendHAIP string `json:"frontendHAIP"` // List of load balancer frontends Frontends ListFrontends `json:"frontends"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Primary node PrimaryNode Node `json:"primaryNode"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` // Secondary node SecondaryNode Node `json:"secondaryNode"` // Status Status string `json:"status"` // Sysctl Params SysctlParams interface{} `json:"sysctlParams"` // Tech status TechStatus string `json:"techStatus"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` // VINS ID VINSID uint64 `json:"vinsId"` }
Detailed information about load balancer in List
type ItemServer ¶
type ItemServer struct { // Address Address string `json:"address"` // Check Check string `json:"check"` // GUID GUID string `json:"guid"` // Name Name string `json:"name"` // Port Port uint64 `json:"port"` // Server settings ServerSettings ServerSettings `json:"serverSettings"` }
Main information about server
type LB ¶
type LB struct {
// contains filtered or unexported fields
}
Structure for creating request to load balancer
func (LB) BackendCreate ¶
BackendCreate creates new backend on the specified load balancer
func (LB) BackendDelete ¶
BackendDelete deletes backend from the specified load balancer. Warning: you cannot undo this action!
func (LB) BackendServerAdd ¶
BackendServerAdd adds server definition to the backend on the specified load balancer
func (LB) BackendServerDelete ¶
BackendServerDelete deletes server definition from the backend on the specified load balancer. Warning: you cannot undo this action!
func (LB) BackendServerUpdate ¶
BackendServerUpdate updates server definition on the backend of load balancer
func (LB) BackendUpdate ¶
BackendUpdate updates existing backend on the specified load balancer. Note that backend name cannot be changed
func (LB) ConfigReset ¶
ConfigReset reset current software configuration of the specified load balancer. Warning: this action cannot be undone!
func (LB) FrontendBind ¶
FrontendBind bind frontend from specified load balancer instance
func (LB) FrontendBindDelete ¶
FrontendBindDelete deletes binding from the specified load balancer frontend
func (LB) FrontendBindUpdate ¶
FrontendBindUpdate updates binding for the specified load balancer frontend
func (LB) FrontendCreate ¶
FrontendCreate creates new frontend on the specified load balancer
func (LB) FrontendDelete ¶
FrontendDelete deletes frontend from the specified load balancer. Warning: you cannot undo this action!
func (LB) GetRaw ¶ added in v1.6.6
GetRaw gets detailed information about load balancer as an array of bytes
func (LB) HighlyAvailable ¶ added in v1.6.0
Make Load Balancer Highly available
func (LB) ListDeleted ¶
ListDeleted gets list of deleted load balancers
func (LB) UpdateSysctParams ¶ added in v1.6.0
Create method will create a new load balancer instance
type ListDeletedRequest ¶
type ListDeletedRequest struct { // Find by ID // Required: false ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by account ID // Required: false AccountID uint64 `url:"accountID,omitempty" json:"accountID,omitempty"` // Find by resource group ID // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Find by tech status // Required: false TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"` // Find by frontend Ip // Required: false FrontIP string `url:"frontIp,omitempty" json:"frontIp,omitempty"` // Find by backend Ip // Required: false BackIP string `url:"backIp,omitempty" json:"backIp,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: true Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
Request struct for get list of deleted load balancers
type ListLB ¶
type ListLB struct { // Data Data []ItemLBList `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of load balancers
func (ListLB) FilterByExtNetID ¶
FilterByExtNetID returns ListLB with specified ExtNetID.
func (ListLB) FilterByID ¶
FilterByID returns ListLB with specified ID.
func (ListLB) FilterByK8SID ¶ added in v1.3.0
func (ll ListLB) FilterByK8SID(ctx context.Context, k8sID uint64, decortClient interfaces.Caller) (*ListLB, error)
FilterByK8SID returns ListLB used by specified K8S cluster.
func (ListLB) FilterByName ¶
FilterByName returns ListLB with specified Name.
func (ListLB) FilterFunc ¶
func (ll ListLB) FilterFunc(predicate func(ItemLBList) bool) ListLB
FilterFunc allows filtering ListLB based on a user-specified predicate.
func (ListLB) FindOne ¶
func (ll ListLB) FindOne() ItemLBList
FindOne returns first found RecordLB If none was found, returns an empty struct.
func (ListLB) Serialize ¶
func (ll ListLB) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
func (ListLB) SortByCreatedTime ¶
SortByCreatedTime sorts ListLB by the CreatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListLB) SortByDeletedTime ¶
SortByDeletedTime sorts ListLB by the DeletedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListLB) SortByUpdatedTime ¶
SortByUpdatedTime sorts ListLB by the UpdatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
type ListRequest ¶
type ListRequest struct { // Find by ID // Required: false ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by account ID // Required: false AccountID uint64 `url:"accountID,omitempty" json:"accountID,omitempty"` // Find by resource group ID // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Find by tech status // Required: false TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` // Find by frontend Ip // Required: false FrontIP string `url:"frontIp,omitempty" json:"frontIp,omitempty"` // Find by backend Ip // Required: false BackIP string `url:"backIp,omitempty" json:"backIp,omitempty"` // Included deleted load balancers // Required: false IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListRequest struct to get list of load balancers
type Node ¶
type Node struct { // Backend IP BackendIP string `json:"backendIp"` // Compute ID ComputeID uint64 `json:"computeId"` // Frontend IP FrontendIP string `json:"frontendIp"` // GUID GUID string `json:"guid"` // MGMTIP MGMTIP string `json:"mgmtIp"` // Network ID NetworkID uint64 `json:"networkId"` }
Main information about node
type RecordLB ¶
type RecordLB struct { // HAMode HAMode bool `json:"HAmode"` // CKey CKey string `json:"_ckey"` // Meta Meta []interface{} `json:"_meta"` // Access Control List ACL interface{} `json:"acl"` // BackendHAIP BackendHAIP string `json:"backendHAIP"` // List of load balancer backends Backends ListBackends `json:"backends"` // Description Description string `json:"desc"` // DPAPI password DPAPIPassword string `json:"dpApiPassword"` // DPAPI user DPAPIUser string `json:"dpApiUser"` // External network ID ExtNetID uint64 `json:"extnetId"` // FrontendHAIP FrontendHAIP string `json:"frontendHAIP"` // List of load balancer frontends Frontends ListFrontends `json:"frontends"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Image ID ImageID uint64 `json:"imageId"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Part K8s PartK8s bool `json:"partK8s"` // Primary node PrimaryNode Node `json:"primaryNode"` // Resource group ID RGID uint64 `json:"rgId"` // Secondary node SecondaryNode Node `json:"secondaryNode"` // Status Status string `json:"status"` // Sysctl Params SysctlParams interface{} `json:"sysctlParams"` // Tech status TechStatus string `json:"techStatus"` // VINS ID VINSID uint64 `json:"vinsId"` }
Detailed information about load balancer
func (RecordLB) Serialize ¶
func (rlb RecordLB) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type RestartRequest ¶
type RestartRequest struct { // ID of the load balancer instance to restart // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
Request struct for restart load balancer
type RestoreRequest ¶
type RestoreRequest struct { // ID of the load balancer instance to restore // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
Request struct for restore load balancer
type ServerSettings ¶
type ServerSettings struct { // Inter Inter uint64 `json:"inter"` // GUID GUID string `json:"guid"` // DownInter DownInter uint64 `json:"downinter"` // Rise Rise uint64 `json:"rise"` // Fall Fall uint64 `json:"fall"` // SlowStart SlowStart uint64 `json:"slowstart"` // Max connections MaxConn uint64 `json:"maxconn"` // Max queue MaxQueue uint64 `json:"maxqueue"` // Weight Weight uint64 `json:"weight"` }
Server settings
type StartRequest ¶
type StartRequest struct { // ID of the LB instance to start // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
Request struct for start load balancer
type StopRequest ¶
type StopRequest struct { // ID of the LB instance to stop // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` }
Request struct for stop load balancer
type UpdateRequest ¶
type UpdateRequest struct { // ID of the load balancer to update // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // New description of this load balancer. // If omitted, current description is retained // Required: true Description string `url:"desc" json:"desc" validate:"required"` }
Request struct for update load balancer
type UpdateSysctParamsRequest ¶ added in v1.6.0
type UpdateSysctParamsRequest struct { // ID of the LB instance // Required: true LBID uint64 `url:"lbId" json:"lbId" validate:"required"` // Custom sysctl values for Load Balancer instance. Applied on boot // Required: true SysctlParams Params `url:"-" json:"sysctlParams" validate:"required,dive"` }
Request struct for update sysct params for lb
Source Files
¶
- backend_create.go
- backend_delete.go
- backend_server_add.go
- backend_server_delete.go
- backend_server_update.go
- backend_update.go
- config_reset.go
- create.go
- delete.go
- disable.go
- enable.go
- filter.go
- frontend_bind.go
- frontend_bind_delete.go
- frontend_binding_update.go
- frontend_create.go
- frontend_delete.go
- get.go
- lb.go
- list.go
- list_deleted.go
- make_highly_available.go
- models.go
- restart.go
- restore.go
- serialize.go
- sorting.go
- start.go
- stop.go
- update.go
- updateSysctParams.go