Documentation
¶
Index ¶
- Constants
- func ApplicationIsRunning() bool
- func DecHTTPConnProcessing()
- func DecreaseConcurrency() int32
- func GetApplicationBuildedAt() string
- func GetApplicationHostname() string
- func GetApplicationStatus() int32
- func GetApplicationVersion() string
- 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 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 CurrentValidConfiguration
- type InfluxSrv
- func (srv *InfluxSrv) ListField(ctx context.Context, measurement, duration string) (fields []string, err error)
- func (srv *InfluxSrv) ListTag(ctx context.Context, measurement string) (tags []string, err error)
- func (srv *InfluxSrv) ListTagValue(ctx context.Context, measurement, tag string) (values []string, err error)
- func (srv *InfluxSrv) Query(ctx context.Context, query string) (items []map[string]interface{}, err error)
- func (srv *InfluxSrv) Write(measurement string, tags map[string]string, fields map[string]interface{}, ...)
- 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 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 CurrentValidConfiguration ¶
type CurrentValidConfiguration struct { UpdatedAt time.Time `json:"updatedAt"` MockTime string `json:"mockTime"` IPBlockList []string `json:"ipBlockList"` SignedKeys []string `json:"signedKeys"` RouterConcurrency map[string]uint32 `json:"routerConcurrency"` RouterMock map[string]routermock.RouterMock `json:"routerMock"` Limits map[string]int `json:"limits"` }
CurrentValidConfiguration 当前有效配置
func GetCurrentValidConfiguration ¶
func GetCurrentValidConfiguration() *CurrentValidConfiguration
GetCurrentValidConfiguration 获取当前有效配置
type InfluxSrv ¶
type InfluxSrv struct {
// contains filtered or unexported fields
}
func (*InfluxSrv) ListField ¶
func (srv *InfluxSrv) ListField(ctx context.Context, measurement, duration string) (fields []string, err error)
ListField return the fields of measurement
func (*InfluxSrv) ListTagValue ¶
func (srv *InfluxSrv) ListTagValue(ctx context.Context, measurement, tag string) (values []string, err error)
ListTagValue list value of tag
type Performance ¶
type Performance struct { Concurrency int32 `json:"concurrency"` RequestProcessedTotal int64 `json:"requestProcessedTotal"` performance.CPUMemory HTTPServerConnStats *performance.ConnStats `json:"httpServerConnStats"` IOCountersStat *performance.IOCountersStat `json:"ioCountersStat"` ConnStat *performance.ConnectionsCount `json:"connStat"` NumCtxSwitchesStat *performance.NumCtxSwitchesStat `json:"numCtxSwitchesStat"` PageFaultsStat *performance.PageFaultsStat `json:"pageFaultsStat"` NumFdsStat *performance.NumFdsStat `json:"numFdsStat"` OpenFilesStats *performance.OpenFilesStat `json:"openFilesStats"` }
Performance 应用性能指标
type RequestLimitConfiguration ¶
RequestLimitConfiguration HTTP请求实例并发限制
Click to show internal directories.
Click to hide internal directories.