Documentation
¶
Index ¶
- Constants
- func ApplicationIsRunning() bool
- func DecHTTPConnProcessing()
- func DecreaseConcurrency() int32
- func GetApplicationBuildedAt() string
- func GetApplicationHostname() string
- func GetApplicationStatus() int32
- func GetApplicationVersion() string
- func GetAvailableConfigurations(ctx context.Context) ([]*ent.Configuration, error)
- func GetConcurrency() int32
- func GetHTTPServerConnState() func(net.Conn, http.ConnState)
- func GetIPBlockList() []string
- func GetSignedKeys() elton.SignedKeysGenerator
- func IncreaseConcurrency() int32
- func IsBlockIP(ip string) bool
- func NewTicker() *finalizer
- func ResetIPBlocker(ipList []string) error
- func SetApplicationBuildedAt(v string)
- func SetApplicationStatus(status int32)
- func SetApplicationVersion(v string)
- func UpdateCPUUsage(ctx context.Context) error
- func ValidateCaptcha(ctx context.Context, id, value string) (bool, error)
- type CaptchaInfo
- type ConfigurationSrv
- type Performance
- type RequestLimitConfiguration
Constants ¶
View Source
const ( // ApplicationStatusStopped 应用停止 ApplicationStatusStopped int32 = iota + 1 // ApplicationStatusRunning 应用运行中 ApplicationStatusRunning // ApplicationStatusStopping 应用正在停止 ApplicationStatusStopping )
Variables ¶
This section is empty.
Functions ¶
func GetApplicationBuildedAt ¶
func GetApplicationBuildedAt() string
GetApplicationBuildedAt 获取应用构建时间
func GetApplicationHostname ¶
func GetApplicationHostname() string
GetApplicationHostname 获取应用运行的hostname
func GetAvailableConfigurations ¶
func GetAvailableConfigurations(ctx context.Context) ([]*ent.Configuration, error)
GetAvailableConfigurations 获取当前有效配置
func GetHTTPServerConnState ¶
GetHTTPServerConnState get http server on conn state function
func GetSignedKeys ¶
func GetSignedKeys() elton.SignedKeysGenerator
GetSignedKeys 获取用于cookie加密的key列表
func SetApplicationBuildedAt ¶
func SetApplicationBuildedAt(v string)
SetApplicationBuildedAt 设置应用构建时间
Types ¶
type CaptchaInfo ¶
type CaptchaInfo struct { ExpiredAt time.Time `json:"expiredAt"` Data []byte `json:"data"` // json输出时,忽略此字段 Value string `json:"-"` ID string `json:"id"` Type string `json:"type"` }
CaptchaInfo 图形验证码
func GetCaptcha ¶
func GetCaptcha(ctx context.Context, fontColor, bgColor string) (*CaptchaInfo, error)
GetCaptcha 获取图形验证码
type Performance ¶
type Performance struct { Concurrency int32 `json:"concurrency"` RequestProcessedTotal int64 `json:"requestProcessedTotal"` performance.CPUMemory HTTPServerConnStats *performance.ConnStats `json:"httpServerConnStats"` *performance.Performance }
Performance 应用性能指标
type RequestLimitConfiguration ¶
RequestLimitConfiguration HTTP请求实例并发限制
Click to show internal directories.
Click to hide internal directories.