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

Function GetPluginForFsType

lib/fs/plugin.go:103–116  ·  view source on GitHub ↗

GetPluginForFsType returns the appropriate plugin for the filesystem type. Returns nil if no plugin can handle the filesystem type.

(fsType string)

Source from the content-addressed store, hash-verified

101// GetPluginForFsType returns the appropriate plugin for the filesystem type.
102// Returns nil if no plugin can handle the filesystem type.
103func GetPluginForFsType(fsType string) FsPlugin {
104 pluginsLock.RLock()
105 defer pluginsLock.RUnlock()
106
107 var best FsPlugin
108 for _, p := range plugins {
109 if p.CanHandle(fsType) {
110 if best == nil || p.Priority() > best.Priority() {
111 best = p
112 }
113 }
114 }
115 return best
116}

Callers 2

processMountsFunction · 0.85
GetFsInfoForPathMethod · 0.85

Calls 2

PriorityMethod · 0.95
CanHandleMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…