github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/pkg/api/server/register_ping.go (about) 1 package server 2 3 import ( 4 "net/http" 5 6 "github.com/containers/libpod/pkg/api/handlers/compat" 7 "github.com/gorilla/mux" 8 ) 9 10 func (s *APIServer) registerPingHandlers(r *mux.Router) error { 11 12 r.Handle("/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet) 13 r.Handle("/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodHead) 14 15 // swagger:operation GET /libpod/_ping libpod libpodPingGet 16 // --- 17 // summary: Ping service 18 // description: | 19 // Return protocol information in response headers. 20 // `HEAD /libpod/_ping` is also supported. 21 // `/_ping` is available for compatibility with other engines. 22 // tags: 23 // - system (compat) 24 // - system 25 // produces: 26 // - text/plain 27 // responses: 28 // 200: 29 // description: Success 30 // schema: 31 // description: OK 32 // type: string 33 // example: "OK" 34 // headers: 35 // API-Version: 36 // type: string 37 // description: Max compatibility API Version the server supports 38 // BuildKit-Version: 39 // type: string 40 // description: Default version of docker image builder 41 // Docker-Experimental: 42 // type: boolean 43 // description: If the server is running with experimental mode enabled, always true 44 // Cache-Control: 45 // type: string 46 // description: always no-cache 47 // Pragma: 48 // type: string 49 // description: always no-cache 50 // Libpod-API-Version: 51 // type: string 52 // description: | 53 // Max Podman API Version the server supports. 54 // Available if service is backed by Podman, therefore may be used to 55 // determine if talking to Podman engine or another engine 56 // Libpod-Buildha-Version: 57 // type: string 58 // description: | 59 // Default version of libpod image builder. 60 // Available if service is backed by Podman, therefore may be used to 61 // determine if talking to Podman engine or another engine 62 // 500: 63 // $ref: "#/responses/InternalError" 64 r.Handle("/libpod/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet) 65 r.Handle("/libpod/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodHead) 66 return nil 67 }