mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00

To help with packaging, the handlers in pkg/api/handlers are now found in pkg/api/handler/compat. Signed-off-by: Jhon Honce <jhonce@redhat.com>
42 lines
1.2 KiB
Go
42 lines
1.2 KiB
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/containers/libpod/pkg/api/handlers/compat"
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func (s *APIServer) registerEventsHandlers(r *mux.Router) error {
|
|
// swagger:operation GET /events system getEvents
|
|
// ---
|
|
// tags:
|
|
// - system
|
|
// summary: Returns events filtered on query parameters
|
|
// description: Returns events filtered on query parameters
|
|
// produces:
|
|
// - application/json
|
|
// parameters:
|
|
// - name: since
|
|
// type: string
|
|
// in: query
|
|
// description: start streaming events from this time
|
|
// - name: until
|
|
// type: string
|
|
// in: query
|
|
// description: stop streaming events later than this
|
|
// - name: filters
|
|
// type: string
|
|
// in: query
|
|
// description: JSON encoded map[string][]string of constraints
|
|
// responses:
|
|
// 200:
|
|
// description: returns a string of json data describing an event
|
|
// 500:
|
|
// "$ref": "#/responses/InternalError"
|
|
r.Handle(VersionedPath("/events"), s.APIHandler(compat.GetEvents)).Methods(http.MethodGet)
|
|
// Added non version path to URI to support docker non versioned paths
|
|
r.Handle("/events", s.APIHandler(compat.GetEvents)).Methods(http.MethodGet)
|
|
return nil
|
|
}
|