Update go dependencies
This commit is contained in:
parent
6438c9f6fe
commit
baf9cc47bd
53 changed files with 2802 additions and 374 deletions
13
images/404-server/vendor/github.com/prometheus/procfs/fs.go
generated
vendored
13
images/404-server/vendor/github.com/prometheus/procfs/fs.go
generated
vendored
|
|
@ -4,6 +4,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/prometheus/procfs/xfs"
|
||||
)
|
||||
|
||||
// FS represents the pseudo-filesystem proc, which provides an interface to
|
||||
|
|
@ -31,3 +33,14 @@ func NewFS(mountPoint string) (FS, error) {
|
|||
func (fs FS) Path(p ...string) string {
|
||||
return path.Join(append([]string{string(fs)}, p...)...)
|
||||
}
|
||||
|
||||
// XFSStats retrieves XFS filesystem runtime statistics.
|
||||
func (fs FS) XFSStats() (*xfs.Stats, error) {
|
||||
f, err := os.Open(fs.Path("fs/xfs/stat"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
return xfs.ParseStats(f)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue