feat: update to go1.24 & support listening https (#1002)

* feat: support listening https

* refactor

* modernize

* support snake case in config

* more precise control of config fields

* update goreleaser config

* remove kubeyaml

* fix: expose agent_secret

* chore
This commit is contained in:
UUBulb
2025-02-28 22:02:54 +08:00
committed by GitHub
parent e770398a11
commit 1d2f8d24f6
28 changed files with 321 additions and 175 deletions

View File

@@ -25,7 +25,7 @@ import (
// @Success 200 {object} model.CommonResponse[model.ServiceResponse]
// @Router /service [get]
func showService(c *gin.Context) (*model.ServiceResponse, error) {
res, err, _ := requestGroup.Do("list-service", func() (interface{}, error) {
res, err, _ := requestGroup.Do("list-service", func() (any, error) {
singleton.AlertsLock.RLock()
defer singleton.AlertsLock.RUnlock()
stats := singleton.ServiceSentinelShared.CopyStats()
@@ -41,8 +41,8 @@ func showService(c *gin.Context) (*model.ServiceResponse, error) {
}
return &model.ServiceResponse{
Services: res.([]interface{})[0].(map[uint64]model.ServiceResponseItem),
CycleTransferStats: res.([]interface{})[1].(map[uint64]model.CycleTransferStats),
Services: res.([]any)[0].(map[uint64]model.ServiceResponseItem),
CycleTransferStats: res.([]any)[1].(map[uint64]model.CycleTransferStats),
}, nil
}