summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_events.go
blob: d764fdbb45e5f8bb5c3fc23ecc16bd6d16222898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package server

import (
	"github.com/containers/libpod/pkg/api/handlers"
	"github.com/gorilla/mux"
)

func (s *APIServer) RegisterEventsHandlers(r *mux.Router) error {
	// swagger:operation GET /events system getEvents
	// ---
	// summary: Returns events filtered on query parameters
	// produces:
	// - application/json
	// parameters:
	// - name: since
	//   in: query
	//   description: start streaming events from this time
	// - name: until
	//   in: query
	//   description: stop streaming events later than this
	// - name: filters
	//   in: query
	//   description: JSON encoded map[string][]string of constraints
	// responses:
	//   "200":
	//     description: OK
	//   "500":
	//     description: Failed
	//     "$ref": "#/types/errorModel"
	r.Handle(VersionedPath("/events"), APIHandler(s.Context, handlers.GetEvents))
	return nil
}