monitor

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableChannel

func DisableChannel(channelId int, channelName string, reason string)

DisableChannel disable & notify

func Emit

func Emit(channelId int, success bool)

Emit 采用非阻塞投递:指标为尽力而为语义,channel 打满时直接丢弃事件, 宁可丢指标也不阻塞请求路径;若阻塞投递或按事件起 goroutine 排队, channel 打满时会导致 goroutine 无界堆积。丢弃属预期行为,不逐条打日志以免刷屏。

func EnableChannel

func EnableChannel(channelId int, channelName string)

EnableChannel enable & notify

func MetricDisableChannel

func MetricDisableChannel(channelId int, successRate float64)

func ShouldDisableChannel

func ShouldDisableChannel(err *model.Error, statusCode int) bool

func ShouldEnableChannel

func ShouldEnableChannel(err error, openAIErr *model.Error) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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