mirror of
https://github.com/containers/podman.git
synced 2026-10-26 11:49:36 -04:00
implement pod stats
Implement pod stats for the local and remote client. Both code paths end up in infra/abi to allow for code share. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
1 parent
efafd99e6d
commit
7ee0f7e14c
12 files changed
+432
-8
No files matched your search
@@ -286,9 +286,36 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
|
||||
// 200:
|
||||
// $ref: "#/responses/DocsPodTopResponse"
|
||||
// 404:
|
||||
// $ref: "#/responses/NoSuchContainer"
|
||||
// $ref: "#/responses/NoSuchPod"
|
||||
// 500:
|
||||
// $ref: "#/responses/InternalError"
|
||||
r.Handle(VersionedPath("/libpod/pods/{name}/top"), s.APIHandler(libpod.PodTop)).Methods(http.MethodGet)
|
||||
// swagger:operation GET /libpod/pods/stats pods statsPod
|
||||
// ---
|
||||
// tags:
|
||||
// - pods
|
||||
// summary: Get stats for one or more pods
|
||||
// description: Display a live stream of resource usage statistics for the containers in one or more pods
|
||||
// parameters:
|
||||
// - in: query
|
||||
// name: all
|
||||
// description: Provide statistics for all running pods.
|
||||
// type: boolean
|
||||
// - in: query
|
||||
// name: namesOrIDs
|
||||
// description: Names or IDs of pods.
|
||||
// type: array
|
||||
// items:
|
||||
// type: string
|
||||
// produces:
|
||||
// - application/json
|
||||
// responses:
|
||||
// 200:
|
||||
// $ref: "#/responses/DocsPodTopResponse"
|
||||
// 404:
|
||||
// $ref: "#/responses/NoSuchPod"
|
||||
// 500:
|
||||
// $ref: "#/responses/InternalError"
|
||||
r.Handle(VersionedPath("/libpod/pods/stats"), s.APIHandler(libpod.PodStats)).Methods(http.MethodGet)
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user