FsPlugin provides filesystem-specific statistics collection.
| 25 | |
| 26 | // FsPlugin provides filesystem-specific statistics collection. |
| 27 | type 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…