backend

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	pagination.Pageable
	Get(ctx context.Context, page, limit int) ([]BackendInfo, error)
	GetByID(ctx context.Context, identifier string) (Backend, error)
	Create(ctx context.Context, definition Definition) (Backend, error)
	Update(ctx context.Context, identifier string, definition Definition) (Backend, error)
	DeleteByID(ctx context.Context, identifier string) error
}

API contains methods for load balancer backend management.

func NewAPI

func NewAPI(c client.Client) API

NewAPI creates a new load balancer backend API instance with the given client.

type Backend

type Backend = v1.Backend

The Backend resource configures settings common for all specific backend Server resources linked to it.

type BackendInfo

type BackendInfo struct {
	Identifier string `json:"identifier" anxcloud:"identifier"`
	Name       string `json:"name"`
}

BackendInfo holds the identifier and the name of a load balancer backend.

type BackendPage

type BackendPage struct {
	Page       int           `json:"page"`
	TotalItems int           `json:"total_items"`
	TotalPages int           `json:"total_pages"`
	Limit      int           `json:"limit"`
	Data       []BackendInfo `json:"data"`
	// contains filtered or unexported fields
}

func (BackendPage) Content

func (f BackendPage) Content() interface{}

func (BackendPage) Num

func (f BackendPage) Num() int

func (BackendPage) Options

func (f BackendPage) Options() []param.Parameter

func (BackendPage) Size

func (f BackendPage) Size() int

func (BackendPage) Total

func (f BackendPage) Total() int

type Definition

type Definition struct {
	Name         string       `json:"name"`
	State        common.State `json:"state"`
	LoadBalancer string       `json:"load_balancer"`
	Mode         common.Mode  `json:"mode"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL