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

Method GetAllValues

core/cache/boltdb_cache.go:68–85  ·  view source on GitHub ↗

GetAllValues - returns all values

()

Source from the content-addressed store, hash-verified

66
67// GetAllValues - returns all values
68func (c *BoltCache) GetAllValues() (values [][]byte, err error) {
69 err = c.DS.View(func(tx *bolt.Tx) error {
70 b := tx.Bucket(c.CurrentBucket)
71 if b == nil {
72 // bucket doesn't exist
73 return nil
74 }
75 c := b.Cursor()
76
77 for k, v := c.First(); k != nil; k, v = c.Next() {
78 var buffer bytes.Buffer
79 buffer.Write(v)
80 values = append(values, buffer.Bytes())
81 }
82 return nil
83 })
84 return
85}
86
87// GetAllEntries - returns all keys/values
88func (c *BoltCache) GetAllEntries() (values map[string][]byte, err error) {

Callers

nothing calls this directly

Calls 1

ViewMethod · 0.65

Tested by

no test coverage detected