Skip to content

Commit

Permalink
Merge pull request #187 from edgelesssys/master
Browse files Browse the repository at this point in the history
Add function to create MemEnv
  • Loading branch information
jamesbibby authored Dec 17, 2019
2 parents eb0a0d0 + bbc5fe7 commit f0fad39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions env.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ func NewDefaultEnv() *Env {
return NewNativeEnv(C.rocksdb_create_default_env())
}

// NewMemEnv creates MemEnv for in-memory testing.
func NewMemEnv() *Env {
return NewNativeEnv(C.rocksdb_create_mem_env())
}

// NewNativeEnv creates a Environment object.
func NewNativeEnv(c *C.rocksdb_env_t) *Env {
return &Env{c}
Expand Down

0 comments on commit f0fad39

Please sign in to comment.