MCPcopy
hub / github.com/nektos/act / openDB

Method openDB

pkg/artifactcache/handler.go:165–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163}
164
165func (h *Handler) openDB() (*bolthold.Store, error) {
166 return bolthold.Open(filepath.Join(h.dir, "bolt.db"), 0o644, &bolthold.Options{
167 Encoder: json.Marshal,
168 Decoder: json.Unmarshal,
169 Options: &bbolt.Options{
170 Timeout: 5 * time.Second,
171 NoGrowSync: bbolt.DefaultOptions.NoGrowSync,
172 FreelistType: bbolt.DefaultOptions.FreelistType,
173 },
174 })
175}
176
177// GET /_apis/artifactcache/cache
178func (h *Handler) find(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {

Callers 8

findMethod · 0.95
reserveMethod · 0.95
uploadMethod · 0.95
commitMethod · 0.95
useCacheMethod · 0.95
gcCacheMethod · 0.95
TestHandlerFunction · 0.80
TestHandler_gcCacheFunction · 0.80

Calls 1

OpenMethod · 0.65

Tested by 2

TestHandlerFunction · 0.64
TestHandler_gcCacheFunction · 0.64