diff --git a/config.go b/config.go index 70f4c1f..7f21dc7 100644 --- a/config.go +++ b/config.go @@ -89,6 +89,10 @@ func InMemoryOnlyConfig() Config { indexConfig := index.InMemoryOnlyConfig() return defaultConfig(indexConfig) } +func DefaultConfigWithDirectory(df func() index.Directory) Config { + indexConfig := index.DefaultConfigWithDirectory(df) + return defaultConfig(indexConfig) +} func defaultConfig(indexConfig index.Config) Config { rv := Config{ diff --git a/index/config.go b/index/config.go index 65bf914..c7217cd 100644 --- a/index/config.go +++ b/index/config.go @@ -145,6 +145,12 @@ func InMemoryOnlyConfig() Config { return rv } +func DefaultConfigWithDirectory(df func() Directory) Config { + rv := defaultConfig() + rv.DirectoryFunc = df + return rv +} + func defaultConfig() Config { rv := Config{ SegmentType: ice.Type,