loadbalance

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopy

func DeepCopy(src, dst *ExportService)

DeepCopy copy src to dst by json

Types

type EptServiceList

type EptServiceList []ExportService

EptServiceList define ExportService list implementing sorter interface

func (EptServiceList) Len

func (el EptServiceList) Len() int

Len is the number of elements in the collection.

func (EptServiceList) Less

func (el EptServiceList) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j.

func (EptServiceList) Swap

func (el EptServiceList) Swap(i, j int)

Swap swaps the elements with indexes i and j.

type ExportPort

type ExportPort struct {
	BCSVHost    string `json:"BCSVHost"`
	Protocol    string `json:"protocol"`
	ServicePort int    `json:"servicePort"`
	TargetPort  int    `json:"targetPort"`
}

ExportPort hold port reflection info

type ExportService

type ExportService struct {
	Cluster     string       `json:"cluster"`     //cluster info
	Namespace   string       `json:"namespace"`   //namespace info, for business
	ServiceName string       `json:"serviceName"` //service name
	ServicePort []ExportPort `json:"ports"`       //export ports info
	Backends    []string     `json:"backend"`     //backend ip list
	BCSGroup    []string     `json:"BCSGroup"`    //service export group
	SSLCert     bool         `json:"sslcert"`     //SSL certificate for ser
	Balance     string       `json:"balance"`     //loadbalance algorithm, default source
	MaxConn     int          `json:"maxconn"`     //max connection setting
}

ExportService info to hold export service

func NewExportService

func NewExportService() ExportService

NewExportService return ExportService default object

func NewPtrExportService

func NewPtrExportService() *ExportService

NewPtrExportService create default ExportService

func (*ExportService) AddBackend

func (es *ExportService) AddBackend(ip string)

AddBackend add single backend to service Backends list

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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