MCPcopy Index your code
hub / github.com/SpectoLabs/hoverfly / GetDB

Function GetDB

core/cache/boltdb_cache.go:186–196  ·  view source on GitHub ↗

GetDB - returns open BoltDB database with read/write permissions or goes down in flames if something bad happends

(name string)

Source from the content-addressed store, hash-verified

184// GetDB - returns open BoltDB database with read/write permissions or goes down in flames if
185// something bad happends
186func GetDB(name string) *bolt.DB {
187 log.WithFields(log.Fields{
188 "databaseName": name,
189 }).Info("Initiating database")
190 db, err := bolt.Open(name, 0600, nil)
191 if err != nil {
192 log.Fatal(err)
193 }
194
195 return db
196}

Callers 4

setupFunction · 0.92
setupFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by 2

setupFunction · 0.74