server

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 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) ([]ServerInfo, error)
	GetByID(ctx context.Context, identifier string) (Server, error)
	Create(ctx context.Context, definition Definition) (Server, error)
	Update(ctx context.Context, identifier string, definition Definition) (Server, error)
	DeleteByID(ctx context.Context, identifier string) error
}

API contains methods for load balancer backend server management.

func NewAPI

func NewAPI(c client.Client) API

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

type Definition

type Definition struct {
	Name    string       `json:"name"`
	State   common.State `json:"state"`
	IP      string       `json:"ip"`
	Port    int          `json:"port"`
	Backend string       `json:"backend"`
}

Definition describes how a server resource should look like

type Server

type Server = v1.Server

type ServerInfo

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

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

type ServerPage

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

func (ServerPage) Content

func (f ServerPage) Content() interface{}

func (ServerPage) Num

func (f ServerPage) Num() int

func (ServerPage) Options

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

func (ServerPage) Size

func (f ServerPage) Size() int

func (ServerPage) Total

func (f ServerPage) Total() int

Jump to

Keyboard shortcuts

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