diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-04-22 11:43:50 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-04-27 12:00:35 +0200 |
commit | 7ee0f7e14c3105be1ef9c8aee00a09b479303677 (patch) | |
tree | 2f55831368cc376a18876a6b201d7be91baaa299 /pkg/api/server | |
parent | efafd99e6d9e2555c2a167bc17d07629503a2c34 (diff) | |
download | podman-7ee0f7e14c3105be1ef9c8aee00a09b479303677.tar.gz podman-7ee0f7e14c3105be1ef9c8aee00a09b479303677.tar.bz2 podman-7ee0f7e14c3105be1ef9c8aee00a09b479303677.zip |
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>
Diffstat (limited to 'pkg/api/server')
-rw-r--r-- | pkg/api/server/register_pods.go | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go index 63060af41..4156dd86b 100644 --- a/pkg/api/server/register_pods.go +++ b/pkg/api/server/register_pods.go @@ -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 } |