Windows: Turn off stats

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard
2016-02-02 17:59:11 -08:00
parent c2bf90eb59
commit 55268f4e91
2 changed files with 11 additions and 0 deletions

View File

@@ -2,7 +2,9 @@ package daemon
import (
"encoding/json"
"errors"
"io"
"runtime"
"github.com/docker/docker/daemon/execdriver"
"github.com/docker/docker/pkg/version"
@@ -22,6 +24,10 @@ type ContainerStatsConfig struct {
// ContainerStats writes information about the container to the stream
// given in the config object.
func (daemon *Daemon) ContainerStats(prefixOrName string, config *ContainerStatsConfig) error {
if runtime.GOOS == "windows" {
return errors.New("Windows does not support stats")
}
container, err := daemon.GetContainer(prefixOrName)
if err != nil {
return err