Returns a point-in-time snapshot of the contents of the store.
()
| 290 | |
| 291 | // Returns a point-in-time snapshot of the contents of the store. |
| 292 | func (st *Store) Snap() (ver int64, g Getter) { |
| 293 | // WARNING: Be sure to read the pointer value of st.state only once. If you |
| 294 | // need multiple accesses, copy the pointer first. |
| 295 | p := st.state |
| 296 | |
| 297 | return p.ver, p.root |
| 298 | } |
| 299 | |
| 300 | // Gets the value stored at `path`, if any. |
| 301 | // |