MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / getStoragePath

Method getStoragePath

pkg/funclet/tmp/tmp_manager.go:114–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112}
113
114func (m *TmpManager) getStoragePath() (path string, err error) {
115 // prepare tmp storage
116 if err := os.MkdirAll(m.options.TmpStoragePath, 0777); err != nil {
117 return "", err
118 }
119 if m.options.TmpStorageType == api.TmpStorageTypeLoop {
120 path = filepath.Join(m.options.TmpStoragePath, m.options.TmpStorageName)
121 } else {
122 path = m.options.TmpStoragePath
123 }
124 return
125}
126
127func (m *TmpManager) requiredStorageSize() (requiredStorage uint64, err error) {
128 runnerBytes, err := bytefmt.ToBytes(m.options.RunnerTmpSize)

Callers 1

NewTmpManagerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected