Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Commit

Permalink
Use pagination on Sensu API events endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
palourde committed Oct 4, 2017
1 parent 03c1fd3 commit 2ba0508
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions uchiwa/sensu/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func (s *Sensu) GetClientHistory(client string) ([]interface{}, error) {
return s.getSlice(fmt.Sprintf("clients/%s/history", client), NoLimit)
}

// UpdateClient updates a client with the provided payload
func (s *Sensu) UpdateClient(payload interface{}) (map[string]interface{}, error) {
payloadstr, err := json.Marshal(payload)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion uchiwa/sensu/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "fmt"

// GetEvents returns a slice of all clients
func (s *Sensu) GetEvents() ([]interface{}, error) {
return s.getSlice("events", NoLimit)
return s.getSlice("events", DefaultLimit)
}

// DeleteEvent delete an event
Expand Down

0 comments on commit 2ba0508

Please sign in to comment.