Skip to content

Commit 4495fc1

Browse files
committed
add PublishAlertEvent func
1 parent 50948e2 commit 4495fc1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: client_alert.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ func (c *Client) ListAlert(project, alertName, dashboard string, offset, size in
550550
return listAlert.Results, listAlert.Total, listAlert.Count, err
551551
}
552552

553-
func (c *Client) InnerAlertPub(project string, alertResult []byte) error {
553+
func (c *Client) PublishAlertEvent(project string, alertResult []byte) error {
554554
h := map[string]string{
555555
"x-log-bodyrawsize": fmt.Sprintf("%v", len(alertResult)),
556556
"Content-Type": "application/json",

Diff for: client_interface.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ type ClientInterface interface {
348348
DeleteProjectPolicy(project string) error
349349
// GetProjectPolicy return project's policy.
350350
GetProjectPolicy(project string) (string, error)
351-
352-
// #################### Inner AlertPub Msg #####################
353-
InnerAlertPub(project string, alertResult []byte) error
351+
352+
// #################### AlertPub Msg #####################
353+
PublishAlertEvent(project string, alertResult []byte) error
354354
}

Diff for: token_auto_update_client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1756,10 +1756,10 @@ func (c *TokenAutoUpdateClient) GetProjectPolicy(project string) (policy string,
17561756
return
17571757
}
17581758

1759-
func (c *TokenAutoUpdateClient) InnerAlertPub(project string, alertResult []byte) error {
1759+
func (c *TokenAutoUpdateClient) PublishAlertEvent(project string, alertResult []byte) error {
17601760
var err error = nil
17611761
for i := 0; i < c.maxTryTimes; i++ {
1762-
err = c.logClient.InnerAlertPub(project, alertResult)
1762+
err = c.logClient.PublishAlertEvent(project, alertResult)
17631763
if err == nil {
17641764
break
17651765
}

0 commit comments

Comments
 (0)