Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertConfig ¶
type AlertConfig struct { // custom tags are usually used to differentiate between different networks and enviroments // such as mainnet/testnet, prod/test/dev or any custom info for more details. CustomTags []string `default:"[testnet,dev]"` DingTalk DingTalkConfig }
type DingTalkAlerter ¶
type DingTalkAlerter struct { // ding talk robot dingrobot.Roboter // contains filtered or unexported fields }
func MustNewDingTalkAlerterFromViper ¶
func MustNewDingTalkAlerterFromViper() *DingTalkAlerter
func NewDingTalkAlerter ¶
func NewDingTalkAlerter(conf AlertConfig) *DingTalkAlerter
func (*DingTalkAlerter) Send ¶
func (dta *DingTalkAlerter) Send(level, brief, detail string) error
type DingTalkConfig ¶
type LogrusAlertHook ¶
type LogrusAlertHook struct {
// contains filtered or unexported fields
}
func NewLogrusAlertHook ¶
func NewLogrusAlertHook(alerter *DingTalkAlerter, lvls []logrus.Level) *LogrusAlertHook
func (*LogrusAlertHook) Levels ¶
func (hook *LogrusAlertHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.