MCPcopy
hub / github.com/google/cadvisor / FsPlugin

Interface FsPlugin

lib/fs/plugin.go:27–44  ·  view source on GitHub ↗

FsPlugin provides filesystem-specific statistics collection.

Source from the content-addressed store, hash-verified

25
26// FsPlugin provides filesystem-specific statistics collection.
27type FsPlugin interface {
28 // Name returns the plugin identifier (e.g., "zfs", "devicemapper", "vfs").
29 Name() string
30
31 // CanHandle returns true if this plugin handles the given filesystem type.
32 CanHandle(fsType string) bool
33
34 // Priority returns the plugin priority (higher = checked first).
35 // Allows specific plugins (zfs, btrfs) to override generic (vfs).
36 Priority() int
37
38 // GetStats returns filesystem statistics for a partition.
39 GetStats(device string, partition PartitionInfo) (*FsStats, error)
40
41 // ProcessMount optionally modifies mount info during processing.
42 // Returns (shouldInclude bool, modifiedMount *mount.Info, error).
43 ProcessMount(mnt *mount.Info) (bool, *mount.Info, error)
44}
45
46// FsCachingPlugin is an optional interface for plugins that want to cache
47// stats by a key (e.g., device ID) to avoid redundant stat calls.

Callers 15

TestValidIdentifiersFunction · 0.65
processStatsFromProcsFunction · 0.65
watchDirectoryMethod · 0.65
ListDirectoriesFunction · 0.65
GetBlockDeviceInfoFunction · 0.65
GetNetworkDevicesFunction · 0.65
GetHugePagesInfoFunction · 0.65
GetCacheInfoFunction · 0.65
GetPluginForFsTypeFunction · 0.65
GetPluginForFsTypeFunction · 0.95
GetStatsMethod · 0.65
GetStatsMethod · 0.65

Implementers 8

testPluginlib/fs/fs_test.go
btrfsPluginlib/fs/btrfs/plugin.go
vfsPluginlib/fs/vfs/plugin.go
nfsPluginlib/fs/nfs/plugin.go
tmpfsPluginlib/fs/tmpfs/plugin.go
zfsPluginlib/fs/zfs/plugin.go
overlayPluginlib/fs/overlay/plugin.go
dmPluginfs/devicemapper/plugin.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…