mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-04-27 13:12:47 +00:00
This commit changes Open() to provide an additional Options argument. The options argument currently only has a Timeout which will cause the Open() to return ErrTimeout if a file lock cannot be obtained in time. Fixes #207.
14 lines
207 B
Go
14 lines
207 B
Go
package bolt
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
var odirect = syscall.O_DIRECT
|
|
|
|
// fdatasync flushes written data to a file descriptor.
|
|
func fdatasync(f *os.File) error {
|
|
return syscall.Fdatasync(int(f.Fd()))
|
|
}
|