Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HeartbeatSetting ¶
type HeartbeatSetting struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id,omitempty"`
HeartbeatIntervalSeconds int `gorm:"default:30" json:"heartbeat_interval_seconds"` // 心跳间隔时间(秒)
HeartbeatFailureThreshold int `gorm:"default:3" json:"heartbeat_failure_threshold"` // 心跳失败阈值
ReconnectMaxIntervalSeconds int `gorm:"default:3600" json:"reconnect_max_interval_seconds"` // 重连最大间隔时间(秒)
MaxRetryAttempts int `gorm:"default:100" json:"max_retry_attempts"` // 最大重试次数,默认100次
}
func DefaultHeartbeatSetting ¶
func DefaultHeartbeatSetting() *HeartbeatSetting
func GetOrCreateHeartbeatSetting ¶
func GetOrCreateHeartbeatSetting() (*HeartbeatSetting, error)
func UpdateHeartbeatSetting ¶
func UpdateHeartbeatSetting(in *HeartbeatSetting) (*HeartbeatSetting, error)
func (HeartbeatSetting) TableName ¶
func (HeartbeatSetting) TableName() string
Click to show internal directories.
Click to hide internal directories.