diff --git a/pkg/kubelet/winstats/BUILD b/pkg/kubelet/winstats/BUILD index 0cfe7e9084..e82b2eceb2 100644 --- a/pkg/kubelet/winstats/BUILD +++ b/pkg/kubelet/winstats/BUILD @@ -2,7 +2,9 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", - srcs = select({ + srcs = [ + "doc.go", + ] + select({ "@io_bazel_rules_go//go/platform:windows": [ "perfcounter_nodestats.go", "perfcounters.go", diff --git a/pkg/kubelet/winstats/doc.go b/pkg/kubelet/winstats/doc.go new file mode 100644 index 0000000000..1a9f7decdc --- /dev/null +++ b/pkg/kubelet/winstats/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package winstats provides a client to get node and pod level stats on windows +package winstats // import "k8s.io/kubernetes/pkg/kubelet/winstats" diff --git a/pkg/kubelet/winstats/winstats.go b/pkg/kubelet/winstats/winstats.go index 011c056e66..2c483f8967 100644 --- a/pkg/kubelet/winstats/winstats.go +++ b/pkg/kubelet/winstats/winstats.go @@ -144,6 +144,7 @@ func (c *StatsClient) createRootContainerInfo() (*cadvisorapiv2.ContainerInfo, e return &rootInfo, nil } +// GetDirFsInfo returns filesystem capacity and usage information. func (c *StatsClient) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) { var freeBytesAvailable, totalNumberOfBytes, totalNumberOfFreeBytes int64 var err error