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

Function New

lib/storage/storage.go:48–57  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

46}
47
48func New(name string) (StorageDriver, error) {
49 if name == "" {
50 return nil, nil
51 }
52 f, ok := registeredPlugins[name]
53 if !ok {
54 return nil, fmt.Errorf("unknown backend storage driver: %s", name)
55 }
56 return f()
57}
58
59func ListDrivers() []string {
60 drivers := make([]string, 0, len(registeredPlugins))

Callers 1

NewMemoryStorageFunction · 0.92

Calls 2

ErrorfMethod · 0.80
fFunction · 0.50

Tested by

no test coverage detected