aibalance

package module
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 21 Imported by: 0

README

aigw_balance

网关平衡

Documentation

Index

Constants

View Source
const (
	// EnforcerModeForZHW 追回温
	EnforcerModeForZHW = iota + 1
	// EnforcerModeForZLL 追流量
	EnforcerModeForZLL
)
View Source
const (
	// EnforcerKindForVertical 垂直计算
	EnforcerKindForVertical int = iota + 1
	// EnforcerKindForHorizontal 水平计算
	EnforcerKindForHorizontal
)
View Source
const (
	// Version 版本号
	Version string = "1.1.2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive added in v1.0.1

type Archive struct {
	// contains filtered or unexported fields
}

Archive 档案信息

func NewArchive added in v1.0.1

func NewArchive() *Archive

func (*Archive) GetBuild added in v1.0.2

func (this *Archive) GetBuild() persist.IArchiveBuild

func (*Archive) GetCode added in v1.0.2

func (this *Archive) GetCode() string

func (*Archive) GetDeg added in v1.0.2

func (this *Archive) GetDeg() uint8

func (*Archive) GetLsl added in v1.0.6

func (this *Archive) GetLsl() float32

func (*Archive) GetName added in v1.0.2

func (this *Archive) GetName() string

func (*Archive) GetRegulate added in v1.0.2

func (this *Archive) GetRegulate() bool

func (*Archive) GetRetTemp added in v1.0.2

func (this *Archive) GetRetTemp() float32

func (*Archive) GetRgl added in v1.0.6

func (this *Archive) GetRgl() float32

func (*Archive) GetRoomTemp added in v1.0.2

func (this *Archive) GetRoomTemp() float32

func (*Archive) GetSupTemp added in v1.0.6

func (this *Archive) GetSupTemp() float32

func (*Archive) GetWeight added in v1.0.2

func (this *Archive) GetWeight() float32

func (*Archive) MarshalJSON added in v1.0.2

func (this *Archive) MarshalJSON() ([]byte, error)

func (*Archive) SetBuild added in v1.0.2

func (this *Archive) SetBuild(build persist.IArchiveBuild)

func (*Archive) SetCode added in v1.0.2

func (this *Archive) SetCode(code string)

func (*Archive) SetDeg added in v1.0.2

func (this *Archive) SetDeg(value uint8)

func (*Archive) SetLsl added in v1.0.6

func (this *Archive) SetLsl(lsl float32)

func (*Archive) SetName added in v1.0.2

func (this *Archive) SetName(name string)

func (*Archive) SetRegulate added in v1.0.2

func (this *Archive) SetRegulate(value bool)

func (*Archive) SetRetTemp added in v1.0.2

func (this *Archive) SetRetTemp(value float32)

func (*Archive) SetRgl added in v1.0.6

func (this *Archive) SetRgl(rgl float32)

func (*Archive) SetRoomTemp added in v1.0.2

func (this *Archive) SetRoomTemp(value float32)

func (*Archive) SetSupTemp added in v1.0.6

func (this *Archive) SetSupTemp(supTemp float32)

func (*Archive) SetWeight added in v1.0.2

func (this *Archive) SetWeight(weight float32)

type ArchiveBuild added in v1.0.2

type ArchiveBuild struct {
	// contains filtered or unexported fields
}

ArchiveBuild 档案建筑信息

func NewArchiveBuild added in v1.0.2

func NewArchiveBuild() *ArchiveBuild

func (*ArchiveBuild) GetArea added in v1.0.2

func (this *ArchiveBuild) GetArea() float32

func (*ArchiveBuild) GetToward added in v1.0.7

func (this *ArchiveBuild) GetToward() string

func (*ArchiveBuild) MarshalJSON added in v1.0.2

func (this *ArchiveBuild) MarshalJSON() ([]byte, error)

func (*ArchiveBuild) SetArea added in v1.0.2

func (this *ArchiveBuild) SetArea(area float32)

func (*ArchiveBuild) SetToward added in v1.0.7

func (this *ArchiveBuild) SetToward(toward string)

type Archives

type Archives []persist.IArchive

func (Archives) HandleCalc added in v1.0.3

func (this Archives) HandleCalc(debug bool, mode, limit int) (bool, uint8)

type Context added in v1.0.2

type Context struct {
	*http.Request
	http.ResponseWriter
}

type Enforcer

type Enforcer struct {
	// contains filtered or unexported fields
}

Enforcer 执行者

func NewEnforcer

func NewEnforcer(options ...Option) *Enforcer

func (*Enforcer) Enforcer

func (this *Enforcer) Enforcer() error

func (*Enforcer) GetParams

func (this *Enforcer) GetParams() map[string]interface{}

func (*Enforcer) GetVersion added in v1.1.4

func (this *Enforcer) GetVersion() string

func (*Enforcer) SetParams

func (this *Enforcer) SetParams(params map[string]interface{}) error

type EnforcerArchive added in v1.0.6

type EnforcerArchive map[string]map[string]model.ArchiveAttribute

type EnforcerCache added in v1.0.2

type EnforcerCache struct {
	// contains filtered or unexported fields
}

type EnforcerCacheHandle added in v1.0.2

type EnforcerCacheHandle struct {
	// contains filtered or unexported fields
}

type EnforcerData added in v1.0.2

type EnforcerData[T persist.IArchive] struct {
	persist.IGateway
	// contains filtered or unexported fields
}

EnforcerData 执行者网关参数

func (*EnforcerData[T]) MarshalJSON added in v1.0.2

func (this *EnforcerData[T]) MarshalJSON() ([]byte, error)

type EnforcerQueueData added in v1.0.2

type EnforcerQueueData[T persist.IArchive] struct {
	// contains filtered or unexported fields
}

func (*EnforcerQueueData[T]) Call added in v1.0.2

func (this *EnforcerQueueData[T]) Call(args ...interface{})

func (*EnforcerQueueData[T]) Delay added in v1.0.2

func (this *EnforcerQueueData[T]) Delay() int

func (*EnforcerQueueData[T]) Priority added in v1.0.2

func (this *EnforcerQueueData[T]) Priority() int

type EnforcerQueues added in v1.1.2

type EnforcerQueues struct {
	// contains filtered or unexported fields
}

type Gateway added in v1.0.2

type Gateway struct {
	// contains filtered or unexported fields
}

func NewGateway added in v1.0.2

func NewGateway() *Gateway

func (*Gateway) GetCode added in v1.0.2

func (this *Gateway) GetCode() string

GetCode 获取编码

func (*Gateway) GetName added in v1.0.2

func (this *Gateway) GetName() string

GetName 获取名称

func (*Gateway) SetCode added in v1.0.2

func (this *Gateway) SetCode(code string)

SetCode 设置编码

func (*Gateway) SetName added in v1.0.2

func (this *Gateway) SetName(name string)

SetName 设置名称

type Option

type Option func(enforcer *Enforcer)

func WithDebug added in v1.1.6

func WithDebug(debug bool) Option

func WithLogger added in v1.0.2

func WithLogger(logger persist.Logger) Option

func WithPort added in v1.0.1

func WithPort(port int) Option

func WithWatcher added in v1.0.1

func WithWatcher(watcher persist.IWatcher) Option

type Page added in v1.0.4

type Page struct {
	Page  int `json:"page" form:"page"`
	Limit int `json:"limit" form:"limit"`
}

type Response added in v1.0.2

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func (*Response) Marshal added in v1.0.2

func (this *Response) Marshal() []byte

func (*Response) Write added in v1.0.2

func (this *Response) Write()

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher added in v1.0.1

func NewWatcher() *Watcher

func (*Watcher) GetArchiveFunc added in v1.0.3

func (this *Watcher) GetArchiveFunc() func(params *persist.WatcherArchiveParams) []persist.IArchive

func (*Watcher) GetParamsCallbackFunc added in v1.0.3

func (this *Watcher) GetParamsCallbackFunc() func(params map[string]interface{})

func (*Watcher) GetRegulateCallbackFunc added in v1.0.3

func (this *Watcher) GetRegulateCallbackFunc() func(params *persist.WatcherRegulateParams) persist.IWatchRegulate

func (*Watcher) SetArchiveFunc added in v1.0.3

func (this *Watcher) SetArchiveFunc(function func(params *persist.WatcherArchiveParams) []persist.IArchive)

func (*Watcher) SetParamsCallbackFunc added in v1.0.3

func (this *Watcher) SetParamsCallbackFunc(function func(params map[string]interface{}))

func (*Watcher) SetRegulateCallbackFunc added in v1.0.3

func (this *Watcher) SetRegulateCallbackFunc(function func(params *persist.WatcherRegulateParams) persist.IWatchRegulate)

type WatcherRegulate added in v1.0.2

type WatcherRegulate struct {
	// contains filtered or unexported fields
}

func NewWatcherRegulate added in v1.0.2

func NewWatcherRegulate() *WatcherRegulate

func (*WatcherRegulate) GetRemark added in v1.0.2

func (this *WatcherRegulate) GetRemark() string

func (*WatcherRegulate) GetStatus added in v1.0.2

func (this *WatcherRegulate) GetStatus() int

func (*WatcherRegulate) SetRemark added in v1.0.2

func (this *WatcherRegulate) SetRemark(remark string)

func (*WatcherRegulate) SetStatus added in v1.0.2

func (this *WatcherRegulate) SetStatus(status int)

Directories

Path Synopsis
lib
orm

Jump to

Keyboard shortcuts

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