utils

package
v0.0.0-...-0d0b246 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string, fsync bool) (int64, error)

func CreateDirs

func CreateDirs(dirs ...string) error

func FirstExistingFile

func FirstExistingFile(filepaths ...string) string

func GetLSNFromDeltaFilename

func GetLSNFromDeltaFilename(filename string) (dbutils.LSN, error)

func Retry

func Retry(fn func() (bool, error), numberOfAttempts int, timeBetweenAttempts time.Duration, totalTimeout time.Duration) error

Retry retries a given function until either it returns true, which indicates success, or the number of attempts reach the limit, or the global timeout is reached. The cool-off period between attempts is passed as well. The cancellation should generally be handled outside of either this function. In other words, if total time is set to a significantly large value, there should be an external mechanism to terminate the routine to be retried with an error.

func SyncFileAndDirectory

func SyncFileAndDirectory(fp *os.File) error

func TableDir

func TableDir(oid dbutils.OID) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL