You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1147 lines
50 KiB

8 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="theme-color" content="#375EAB">
  7. <title>opt - The Go Programming Language</title>
  8. <link type="text/css" rel="stylesheet" href="../../../../../../lib/godoc/style.css">
  9. <link rel="stylesheet" href="../../../../../../lib/godoc/jquery.treeview.css">
  10. <script type="text/javascript">window.initFuncs = [];</script>
  11. </head>
  12. <body>
  13. <div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
  14. ...
  15. </div><!-- #lowframe -->
  16. <div id="topbar" class="wide"><div class="container">
  17. <div class="top-heading" id="heading-wide"><a href="http://localhost:6060/">The Go Programming Language</a></div>
  18. <div class="top-heading" id="heading-narrow"><a href="http://localhost:6060/">Go</a></div>
  19. <a href="index.html#" id="menu-button"><span id="menu-button-arrow">&#9661;</span></a>
  20. <form method="GET" action="http://localhost:6060/search">
  21. <div id="menu">
  22. <a href="http://localhost:6060/doc/">Documents</a>
  23. <a href="http://localhost:6060/pkg/">Packages</a>
  24. <a href="http://localhost:6060/project/">The Project</a>
  25. <a href="http://localhost:6060/help/">Help</a>
  26. <a href="http://localhost:6060/blog/">Blog</a>
  27. <input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
  28. </div>
  29. </form>
  30. </div></div>
  31. <div id="page" class="wide">
  32. <div class="container">
  33. <h1>Package opt</h1>
  34. <div id="nav"></div>
  35. <!--
  36. Copyright 2009 The Go Authors. All rights reserved.
  37. Use of this source code is governed by a BSD-style
  38. license that can be found in the LICENSE file.
  39. -->
  40. <!--
  41. Note: Static (i.e., not template-generated) href and id
  42. attributes start with "pkg-" to make it impossible for
  43. them to conflict with generated attributes (some of which
  44. correspond to Go identifiers).
  45. -->
  46. <script type='text/javascript'>
  47. document.ANALYSIS_DATA = null;
  48. document.CALLGRAPH = null;
  49. </script>
  50. <div id="short-nav">
  51. <dl>
  52. <dd><code>import "github.com/syndtr/goleveldb/leveldb/opt"</code></dd>
  53. </dl>
  54. <dl>
  55. <dd><a href="index.html#pkg-overview" class="overviewLink">Overview</a></dd>
  56. <dd><a href="index.html#pkg-index" class="indexLink">Index</a></dd>
  57. </dl>
  58. </div>
  59. <!-- The package's Name is printed as title by the top-level template -->
  60. <div id="pkg-overview" class="toggleVisible">
  61. <div class="collapsed">
  62. <h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
  63. </div>
  64. <div class="expanded">
  65. <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
  66. <p>
  67. Package opt provides sets of options used by LevelDB.
  68. </p>
  69. </div>
  70. </div>
  71. <div id="pkg-index" class="toggleVisible">
  72. <div class="collapsed">
  73. <h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
  74. </div>
  75. <div class="expanded">
  76. <h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
  77. <!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
  78. <div id="manual-nav">
  79. <dl>
  80. <dd><a href="index.html#pkg-constants">Constants</a></dd>
  81. <dd><a href="index.html#pkg-variables">Variables</a></dd>
  82. <dd><a href="index.html#GetStrict">func GetStrict(o *Options, ro *ReadOptions, strict Strict) bool</a></dd>
  83. <dd><a href="index.html#Cacher">type Cacher</a></dd>
  84. <dd><a href="index.html#CacherFunc">type CacherFunc</a></dd>
  85. <dd>&nbsp; &nbsp; <a href="index.html#CacherFunc.New">func (f *CacherFunc) New(capacity int) cache.Cacher</a></dd>
  86. <dd><a href="index.html#Compression">type Compression</a></dd>
  87. <dd>&nbsp; &nbsp; <a href="index.html#Compression.String">func (c Compression) String() string</a></dd>
  88. <dd><a href="index.html#Options">type Options</a></dd>
  89. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetAltFilters">func (o *Options) GetAltFilters() []filter.Filter</a></dd>
  90. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetBlockCacheCapacity">func (o *Options) GetBlockCacheCapacity() int</a></dd>
  91. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetBlockCacher">func (o *Options) GetBlockCacher() Cacher</a></dd>
  92. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetBlockRestartInterval">func (o *Options) GetBlockRestartInterval() int</a></dd>
  93. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetBlockSize">func (o *Options) GetBlockSize() int</a></dd>
  94. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetCompactionExpandLimit">func (o *Options) GetCompactionExpandLimit(level int) int</a></dd>
  95. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetCompactionGPOverlaps">func (o *Options) GetCompactionGPOverlaps(level int) int</a></dd>
  96. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetCompactionL0Trigger">func (o *Options) GetCompactionL0Trigger() int</a></dd>
  97. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetCompactionSourceLimit">func (o *Options) GetCompactionSourceLimit(level int) int</a></dd>
  98. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetCompactionTableSize">func (o *Options) GetCompactionTableSize(level int) int</a></dd>
  99. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetCompactionTotalSize">func (o *Options) GetCompactionTotalSize(level int) int64</a></dd>
  100. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetComparer">func (o *Options) GetComparer() comparer.Comparer</a></dd>
  101. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetCompression">func (o *Options) GetCompression() Compression</a></dd>
  102. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetDisableBlockCache">func (o *Options) GetDisableBlockCache() bool</a></dd>
  103. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetDisableBufferPool">func (o *Options) GetDisableBufferPool() bool</a></dd>
  104. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetDisableCompactionBackoff">func (o *Options) GetDisableCompactionBackoff() bool</a></dd>
  105. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetDisableLargeBatchTransaction">func (o *Options) GetDisableLargeBatchTransaction() bool</a></dd>
  106. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetErrorIfExist">func (o *Options) GetErrorIfExist() bool</a></dd>
  107. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetErrorIfMissing">func (o *Options) GetErrorIfMissing() bool</a></dd>
  108. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetFilter">func (o *Options) GetFilter() filter.Filter</a></dd>
  109. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetIteratorSamplingRate">func (o *Options) GetIteratorSamplingRate() int</a></dd>
  110. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetNoSync">func (o *Options) GetNoSync() bool</a></dd>
  111. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetNoWriteMerge">func (o *Options) GetNoWriteMerge() bool</a></dd>
  112. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetOpenFilesCacheCapacity">func (o *Options) GetOpenFilesCacheCapacity() int</a></dd>
  113. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetOpenFilesCacher">func (o *Options) GetOpenFilesCacher() Cacher</a></dd>
  114. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetReadOnly">func (o *Options) GetReadOnly() bool</a></dd>
  115. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetStrict">func (o *Options) GetStrict(strict Strict) bool</a></dd>
  116. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetWriteBuffer">func (o *Options) GetWriteBuffer() int</a></dd>
  117. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetWriteL0PauseTrigger">func (o *Options) GetWriteL0PauseTrigger() int</a></dd>
  118. <dd>&nbsp; &nbsp; <a href="index.html#Options.GetWriteL0SlowdownTrigger">func (o *Options) GetWriteL0SlowdownTrigger() int</a></dd>
  119. <dd><a href="index.html#ReadOptions">type ReadOptions</a></dd>
  120. <dd>&nbsp; &nbsp; <a href="index.html#ReadOptions.GetDontFillCache">func (ro *ReadOptions) GetDontFillCache() bool</a></dd>
  121. <dd>&nbsp; &nbsp; <a href="index.html#ReadOptions.GetStrict">func (ro *ReadOptions) GetStrict(strict Strict) bool</a></dd>
  122. <dd><a href="index.html#Strict">type Strict</a></dd>
  123. <dd><a href="index.html#WriteOptions">type WriteOptions</a></dd>
  124. <dd>&nbsp; &nbsp; <a href="index.html#WriteOptions.GetNoWriteMerge">func (wo *WriteOptions) GetNoWriteMerge() bool</a></dd>
  125. <dd>&nbsp; &nbsp; <a href="index.html#WriteOptions.GetSync">func (wo *WriteOptions) GetSync() bool</a></dd>
  126. </dl>
  127. </div><!-- #manual-nav -->
  128. <h4>Package files</h4>
  129. <p>
  130. <span style="font-size:90%">
  131. <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go">options.go</a>
  132. </span>
  133. </p>
  134. </div><!-- .expanded -->
  135. </div><!-- #pkg-index -->
  136. <div id="pkg-callgraph" class="toggle" style="display: none">
  137. <div class="collapsed">
  138. <h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
  139. </div> <!-- .expanded -->
  140. <div class="expanded">
  141. <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
  142. <p>
  143. In the call graph viewer below, each node
  144. is a function belonging to this package
  145. and its children are the functions it
  146. calls&mdash;perhaps dynamically.
  147. </p>
  148. <p>
  149. The root nodes are the entry points of the
  150. package: functions that may be called from
  151. outside the package.
  152. There may be non-exported or anonymous
  153. functions among them if they are called
  154. dynamically from another package.
  155. </p>
  156. <p>
  157. Click a node to visit that function's source code.
  158. From there you can visit its callers by
  159. clicking its declaring <code>func</code>
  160. token.
  161. </p>
  162. <p>
  163. Functions may be omitted if they were
  164. determined to be unreachable in the
  165. particular programs or tests that were
  166. analyzed.
  167. </p>
  168. <!-- Zero means show all package entry points. -->
  169. <ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
  170. </div>
  171. </div> <!-- #pkg-callgraph -->
  172. <h2 id="pkg-constants">Constants</h2>
  173. <pre>const (
  174. <span id="KiB">KiB</span> = 1024
  175. <span id="MiB">MiB</span> = <a href="index.html#KiB">KiB</a> * 1024
  176. <span id="GiB">GiB</span> = <a href="index.html#MiB">MiB</a> * 1024
  177. )</pre>
  178. <h2 id="pkg-variables">Variables</h2>
  179. <pre>var (
  180. <span id="DefaultBlockCacher">DefaultBlockCacher</span> = <a href="index.html#LRUCacher">LRUCacher</a>
  181. <span id="DefaultBlockCacheCapacity">DefaultBlockCacheCapacity</span> = 8 * <a href="index.html#MiB">MiB</a>
  182. <span id="DefaultBlockRestartInterval">DefaultBlockRestartInterval</span> = 16
  183. <span id="DefaultBlockSize">DefaultBlockSize</span> = 4 * <a href="index.html#KiB">KiB</a>
  184. <span id="DefaultCompactionExpandLimitFactor">DefaultCompactionExpandLimitFactor</span> = 25
  185. <span id="DefaultCompactionGPOverlapsFactor">DefaultCompactionGPOverlapsFactor</span> = 10
  186. <span id="DefaultCompactionL0Trigger">DefaultCompactionL0Trigger</span> = 4
  187. <span id="DefaultCompactionSourceLimitFactor">DefaultCompactionSourceLimitFactor</span> = 1
  188. <span id="DefaultCompactionTableSize">DefaultCompactionTableSize</span> = 2 * <a href="index.html#MiB">MiB</a>
  189. <span id="DefaultCompactionTableSizeMultiplier">DefaultCompactionTableSizeMultiplier</span> = 1.0
  190. <span id="DefaultCompactionTotalSize">DefaultCompactionTotalSize</span> = 10 * <a href="index.html#MiB">MiB</a>
  191. <span id="DefaultCompactionTotalSizeMultiplier">DefaultCompactionTotalSizeMultiplier</span> = 10.0
  192. <span id="DefaultCompressionType">DefaultCompressionType</span> = <a href="index.html#SnappyCompression">SnappyCompression</a>
  193. <span id="DefaultIteratorSamplingRate">DefaultIteratorSamplingRate</span> = 1 * <a href="index.html#MiB">MiB</a>
  194. <span id="DefaultOpenFilesCacher">DefaultOpenFilesCacher</span> = <a href="index.html#LRUCacher">LRUCacher</a>
  195. <span id="DefaultOpenFilesCacheCapacity">DefaultOpenFilesCacheCapacity</span> = 500
  196. <span id="DefaultWriteBuffer">DefaultWriteBuffer</span> = 4 * <a href="index.html#MiB">MiB</a>
  197. <span id="DefaultWriteL0PauseTrigger">DefaultWriteL0PauseTrigger</span> = 12
  198. <span id="DefaultWriteL0SlowdownTrigger">DefaultWriteL0SlowdownTrigger</span> = 8
  199. )</pre>
  200. <pre>var (
  201. <span class="comment">// LRUCacher is the LRU-cache algorithm.</span>
  202. <span id="LRUCacher">LRUCacher</span> = &amp;<a href="index.html#CacherFunc">CacherFunc</a>{<a href="../cache/index.html">cache</a>.<a href="../cache/index.html#NewLRU">NewLRU</a>}
  203. <span class="comment">// NoCacher is the value to disable caching algorithm.</span>
  204. <span id="NoCacher">NoCacher</span> = &amp;<a href="index.html#CacherFunc">CacherFunc</a>{}
  205. )</pre>
  206. <h2 id="GetStrict">func <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=18476:18539#L668">GetStrict</a></h2>
  207. <pre>func GetStrict(o *<a href="index.html#Options">Options</a>, ro *<a href="index.html#ReadOptions">ReadOptions</a>, strict <a href="index.html#Strict">Strict</a>) <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  208. <h2 id="Cacher">type <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=1405:1462#L37">Cacher</a></h2>
  209. <pre>type Cacher interface {
  210. New(capacity <a href="../../../../../builtin/index.html#int">int</a>) <a href="../cache/index.html">cache</a>.<a href="../cache/index.html#Cacher">Cacher</a>
  211. }</pre>
  212. <p>
  213. Cacher is a caching algorithm.
  214. </p>
  215. <h2 id="CacherFunc">type <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=1464:1531#L41">CacherFunc</a></h2>
  216. <pre>type CacherFunc struct {
  217. NewFunc func(capacity <a href="../../../../../builtin/index.html#int">int</a>) <a href="../cache/index.html">cache</a>.<a href="../cache/index.html#Cacher">Cacher</a>
  218. }</pre>
  219. <h3 id="CacherFunc.New">func (*CacherFunc) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=1533:1584#L45">New</a></h3>
  220. <pre>func (f *<a href="index.html#CacherFunc">CacherFunc</a>) New(capacity <a href="../../../../../builtin/index.html#int">int</a>) <a href="../cache/index.html">cache</a>.<a href="../cache/index.html#Cacher">Cacher</a></pre>
  221. <h2 id="Compression">type <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=1951:1972#L63">Compression</a></h2>
  222. <pre>type Compression <a href="../../../../../builtin/index.html#uint">uint</a></pre>
  223. <p>
  224. Compression is the &#39;sorted table&#39; block compression algorithm to use.
  225. </p>
  226. <pre>const (
  227. <span id="DefaultCompression">DefaultCompression</span> <a href="index.html#Compression">Compression</a> = <a href="../../../../../builtin/index.html#iota">iota</a>
  228. <span id="NoCompression">NoCompression</span>
  229. <span id="SnappyCompression">SnappyCompression</span>
  230. )</pre>
  231. <h3 id="Compression.String">func (Compression) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=1974:2010#L65">String</a></h3>
  232. <pre>func (c <a href="index.html#Compression">Compression</a>) String() <a href="../../../../../builtin/index.html#string">string</a></pre>
  233. <h2 id="Options">type <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=4032:11043#L131">Options</a></h2>
  234. <pre>type Options struct {
  235. <span class="comment">// AltFilters defines one or more &#39;alternative filters&#39;.</span>
  236. <span class="comment">// &#39;alternative filters&#39; will be used during reads if a filter block</span>
  237. <span class="comment">// does not match with the &#39;effective filter&#39;.</span>
  238. <span class="comment">//</span>
  239. <span class="comment">// The default value is nil</span>
  240. AltFilters []<a href="../filter/index.html">filter</a>.<a href="../filter/index.html#Filter">Filter</a>
  241. <span class="comment">// BlockCacher provides cache algorithm for LevelDB &#39;sorted table&#39; block caching.</span>
  242. <span class="comment">// Specify NoCacher to disable caching algorithm.</span>
  243. <span class="comment">//</span>
  244. <span class="comment">// The default value is LRUCacher.</span>
  245. BlockCacher <a href="index.html#Cacher">Cacher</a>
  246. <span class="comment">// BlockCacheCapacity defines the capacity of the &#39;sorted table&#39; block caching.</span>
  247. <span class="comment">// Use -1 for zero, this has same effect as specifying NoCacher to BlockCacher.</span>
  248. <span class="comment">//</span>
  249. <span class="comment">// The default value is 8MiB.</span>
  250. BlockCacheCapacity <a href="../../../../../builtin/index.html#int">int</a>
  251. <span class="comment">// BlockRestartInterval is the number of keys between restart points for</span>
  252. <span class="comment">// delta encoding of keys.</span>
  253. <span class="comment">//</span>
  254. <span class="comment">// The default value is 16.</span>
  255. BlockRestartInterval <a href="../../../../../builtin/index.html#int">int</a>
  256. <span class="comment">// BlockSize is the minimum uncompressed size in bytes of each &#39;sorted table&#39;</span>
  257. <span class="comment">// block.</span>
  258. <span class="comment">//</span>
  259. <span class="comment">// The default value is 4KiB.</span>
  260. BlockSize <a href="../../../../../builtin/index.html#int">int</a>
  261. <span class="comment">// CompactionExpandLimitFactor limits compaction size after expanded.</span>
  262. <span class="comment">// This will be multiplied by table size limit at compaction target level.</span>
  263. <span class="comment">//</span>
  264. <span class="comment">// The default value is 25.</span>
  265. CompactionExpandLimitFactor <a href="../../../../../builtin/index.html#int">int</a>
  266. <span class="comment">// CompactionGPOverlapsFactor limits overlaps in grandparent (Level + 2) that a</span>
  267. <span class="comment">// single &#39;sorted table&#39; generates.</span>
  268. <span class="comment">// This will be multiplied by table size limit at grandparent level.</span>
  269. <span class="comment">//</span>
  270. <span class="comment">// The default value is 10.</span>
  271. CompactionGPOverlapsFactor <a href="../../../../../builtin/index.html#int">int</a>
  272. <span class="comment">// CompactionL0Trigger defines number of &#39;sorted table&#39; at level-0 that will</span>
  273. <span class="comment">// trigger compaction.</span>
  274. <span class="comment">//</span>
  275. <span class="comment">// The default value is 4.</span>
  276. CompactionL0Trigger <a href="../../../../../builtin/index.html#int">int</a>
  277. <span class="comment">// CompactionSourceLimitFactor limits compaction source size. This doesn&#39;t apply to</span>
  278. <span class="comment">// level-0.</span>
  279. <span class="comment">// This will be multiplied by table size limit at compaction target level.</span>
  280. <span class="comment">//</span>
  281. <span class="comment">// The default value is 1.</span>
  282. CompactionSourceLimitFactor <a href="../../../../../builtin/index.html#int">int</a>
  283. <span class="comment">// CompactionTableSize limits size of &#39;sorted table&#39; that compaction generates.</span>
  284. <span class="comment">// The limits for each level will be calculated as:</span>
  285. <span class="comment">// CompactionTableSize * (CompactionTableSizeMultiplier ^ Level)</span>
  286. <span class="comment">// The multiplier for each level can also fine-tuned using CompactionTableSizeMultiplierPerLevel.</span>
  287. <span class="comment">//</span>
  288. <span class="comment">// The default value is 2MiB.</span>
  289. CompactionTableSize <a href="../../../../../builtin/index.html#int">int</a>
  290. <span class="comment">// CompactionTableSizeMultiplier defines multiplier for CompactionTableSize.</span>
  291. <span class="comment">//</span>
  292. <span class="comment">// The default value is 1.</span>
  293. CompactionTableSizeMultiplier <a href="../../../../../builtin/index.html#float64">float64</a>
  294. <span class="comment">// CompactionTableSizeMultiplierPerLevel defines per-level multiplier for</span>
  295. <span class="comment">// CompactionTableSize.</span>
  296. <span class="comment">// Use zero to skip a level.</span>
  297. <span class="comment">//</span>
  298. <span class="comment">// The default value is nil.</span>
  299. CompactionTableSizeMultiplierPerLevel []<a href="../../../../../builtin/index.html#float64">float64</a>
  300. <span class="comment">// CompactionTotalSize limits total size of &#39;sorted table&#39; for each level.</span>
  301. <span class="comment">// The limits for each level will be calculated as:</span>
  302. <span class="comment">// CompactionTotalSize * (CompactionTotalSizeMultiplier ^ Level)</span>
  303. <span class="comment">// The multiplier for each level can also fine-tuned using</span>
  304. <span class="comment">// CompactionTotalSizeMultiplierPerLevel.</span>
  305. <span class="comment">//</span>
  306. <span class="comment">// The default value is 10MiB.</span>
  307. CompactionTotalSize <a href="../../../../../builtin/index.html#int">int</a>
  308. <span class="comment">// CompactionTotalSizeMultiplier defines multiplier for CompactionTotalSize.</span>
  309. <span class="comment">//</span>
  310. <span class="comment">// The default value is 10.</span>
  311. CompactionTotalSizeMultiplier <a href="../../../../../builtin/index.html#float64">float64</a>
  312. <span class="comment">// CompactionTotalSizeMultiplierPerLevel defines per-level multiplier for</span>
  313. <span class="comment">// CompactionTotalSize.</span>
  314. <span class="comment">// Use zero to skip a level.</span>
  315. <span class="comment">//</span>
  316. <span class="comment">// The default value is nil.</span>
  317. CompactionTotalSizeMultiplierPerLevel []<a href="../../../../../builtin/index.html#float64">float64</a>
  318. <span class="comment">// Comparer defines a total ordering over the space of []byte keys: a &#39;less</span>
  319. <span class="comment">// than&#39; relationship. The same comparison algorithm must be used for reads</span>
  320. <span class="comment">// and writes over the lifetime of the DB.</span>
  321. <span class="comment">//</span>
  322. <span class="comment">// The default value uses the same ordering as bytes.Compare.</span>
  323. Comparer <a href="../comparer/index.html">comparer</a>.<a href="../comparer/index.html#Comparer">Comparer</a>
  324. <span class="comment">// Compression defines the &#39;sorted table&#39; block compression to use.</span>
  325. <span class="comment">//</span>
  326. <span class="comment">// The default value (DefaultCompression) uses snappy compression.</span>
  327. Compression <a href="index.html#Compression">Compression</a>
  328. <span class="comment">// DisableBufferPool allows disable use of util.BufferPool functionality.</span>
  329. <span class="comment">//</span>
  330. <span class="comment">// The default value is false.</span>
  331. DisableBufferPool <a href="../../../../../builtin/index.html#bool">bool</a>
  332. <span class="comment">// DisableBlockCache allows disable use of cache.Cache functionality on</span>
  333. <span class="comment">// &#39;sorted table&#39; block.</span>
  334. <span class="comment">//</span>
  335. <span class="comment">// The default value is false.</span>
  336. DisableBlockCache <a href="../../../../../builtin/index.html#bool">bool</a>
  337. <span class="comment">// DisableCompactionBackoff allows disable compaction retry backoff.</span>
  338. <span class="comment">//</span>
  339. <span class="comment">// The default value is false.</span>
  340. DisableCompactionBackoff <a href="../../../../../builtin/index.html#bool">bool</a>
  341. <span class="comment">// DisableLargeBatchTransaction allows disabling switch-to-transaction mode</span>
  342. <span class="comment">// on large batch write. If enable batch writes large than WriteBuffer will</span>
  343. <span class="comment">// use transaction.</span>
  344. <span class="comment">//</span>
  345. <span class="comment">// The default is false.</span>
  346. DisableLargeBatchTransaction <a href="../../../../../builtin/index.html#bool">bool</a>
  347. <span class="comment">// ErrorIfExist defines whether an error should returned if the DB already</span>
  348. <span class="comment">// exist.</span>
  349. <span class="comment">//</span>
  350. <span class="comment">// The default value is false.</span>
  351. ErrorIfExist <a href="../../../../../builtin/index.html#bool">bool</a>
  352. <span class="comment">// ErrorIfMissing defines whether an error should returned if the DB is</span>
  353. <span class="comment">// missing. If false then the database will be created if missing, otherwise</span>
  354. <span class="comment">// an error will be returned.</span>
  355. <span class="comment">//</span>
  356. <span class="comment">// The default value is false.</span>
  357. ErrorIfMissing <a href="../../../../../builtin/index.html#bool">bool</a>
  358. <span class="comment">// Filter defines an &#39;effective filter&#39; to use. An &#39;effective filter&#39;</span>
  359. <span class="comment">// if defined will be used to generate per-table filter block.</span>
  360. <span class="comment">// The filter name will be stored on disk.</span>
  361. <span class="comment">// During reads LevelDB will try to find matching filter from</span>
  362. <span class="comment">// &#39;effective filter&#39; and &#39;alternative filters&#39;.</span>
  363. <span class="comment">//</span>
  364. <span class="comment">// Filter can be changed after a DB has been created. It is recommended</span>
  365. <span class="comment">// to put old filter to the &#39;alternative filters&#39; to mitigate lack of</span>
  366. <span class="comment">// filter during transition period.</span>
  367. <span class="comment">//</span>
  368. <span class="comment">// A filter is used to reduce disk reads when looking for a specific key.</span>
  369. <span class="comment">//</span>
  370. <span class="comment">// The default value is nil.</span>
  371. Filter <a href="../filter/index.html">filter</a>.<a href="../filter/index.html#Filter">Filter</a>
  372. <span class="comment">// IteratorSamplingRate defines approximate gap (in bytes) between read</span>
  373. <span class="comment">// sampling of an iterator. The samples will be used to determine when</span>
  374. <span class="comment">// compaction should be triggered.</span>
  375. <span class="comment">//</span>
  376. <span class="comment">// The default is 1MiB.</span>
  377. IteratorSamplingRate <a href="../../../../../builtin/index.html#int">int</a>
  378. <span class="comment">// NoSync allows completely disable fsync.</span>
  379. <span class="comment">//</span>
  380. <span class="comment">// The default is false.</span>
  381. NoSync <a href="../../../../../builtin/index.html#bool">bool</a>
  382. <span class="comment">// NoWriteMerge allows disabling write merge.</span>
  383. <span class="comment">//</span>
  384. <span class="comment">// The default is false.</span>
  385. NoWriteMerge <a href="../../../../../builtin/index.html#bool">bool</a>
  386. <span class="comment">// OpenFilesCacher provides cache algorithm for open files caching.</span>
  387. <span class="comment">// Specify NoCacher to disable caching algorithm.</span>
  388. <span class="comment">//</span>
  389. <span class="comment">// The default value is LRUCacher.</span>
  390. OpenFilesCacher <a href="index.html#Cacher">Cacher</a>
  391. <span class="comment">// OpenFilesCacheCapacity defines the capacity of the open files caching.</span>
  392. <span class="comment">// Use -1 for zero, this has same effect as specifying NoCacher to OpenFilesCacher.</span>
  393. <span class="comment">//</span>
  394. <span class="comment">// The default value is 500.</span>
  395. OpenFilesCacheCapacity <a href="../../../../../builtin/index.html#int">int</a>
  396. <span class="comment">// If true then opens DB in read-only mode.</span>
  397. <span class="comment">//</span>
  398. <span class="comment">// The default value is false.</span>
  399. ReadOnly <a href="../../../../../builtin/index.html#bool">bool</a>
  400. <span class="comment">// Strict defines the DB strict level.</span>
  401. Strict <a href="index.html#Strict">Strict</a>
  402. <span class="comment">// WriteBuffer defines maximum size of a &#39;memdb&#39; before flushed to</span>
  403. <span class="comment">// &#39;sorted table&#39;. &#39;memdb&#39; is an in-memory DB backed by an on-disk</span>
  404. <span class="comment">// unsorted journal.</span>
  405. <span class="comment">//</span>
  406. <span class="comment">// LevelDB may held up to two &#39;memdb&#39; at the same time.</span>
  407. <span class="comment">//</span>
  408. <span class="comment">// The default value is 4MiB.</span>
  409. WriteBuffer <a href="../../../../../builtin/index.html#int">int</a>
  410. <span class="comment">// WriteL0StopTrigger defines number of &#39;sorted table&#39; at level-0 that will</span>
  411. <span class="comment">// pause write.</span>
  412. <span class="comment">//</span>
  413. <span class="comment">// The default value is 12.</span>
  414. WriteL0PauseTrigger <a href="../../../../../builtin/index.html#int">int</a>
  415. <span class="comment">// WriteL0SlowdownTrigger defines number of &#39;sorted table&#39; at level-0 that</span>
  416. <span class="comment">// will trigger write slowdown.</span>
  417. <span class="comment">//</span>
  418. <span class="comment">// The default value is 8.</span>
  419. WriteL0SlowdownTrigger <a href="../../../../../builtin/index.html#int">int</a>
  420. }</pre>
  421. <p>
  422. Options holds the optional parameters for the DB at large.
  423. </p>
  424. <h3 id="Options.GetAltFilters">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=11045:11094#L352">GetAltFilters</a></h3>
  425. <pre>func (o *<a href="index.html#Options">Options</a>) GetAltFilters() []<a href="../filter/index.html">filter</a>.<a href="../filter/index.html#Filter">Filter</a></pre>
  426. <h3 id="Options.GetBlockCacheCapacity">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=11343:11388#L368">GetBlockCacheCapacity</a></h3>
  427. <pre>func (o *<a href="index.html#Options">Options</a>) GetBlockCacheCapacity() <a href="../../../../../builtin/index.html#int">int</a></pre>
  428. <h3 id="Options.GetBlockCacher">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=11152:11193#L359">GetBlockCacher</a></h3>
  429. <pre>func (o *<a href="index.html#Options">Options</a>) GetBlockCacher() <a href="index.html#Cacher">Cacher</a></pre>
  430. <h3 id="Options.GetBlockRestartInterval">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=11554:11601#L377">GetBlockRestartInterval</a></h3>
  431. <pre>func (o *<a href="index.html#Options">Options</a>) GetBlockRestartInterval() <a href="../../../../../builtin/index.html#int">int</a></pre>
  432. <h3 id="Options.GetBlockSize">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=11724:11760#L384">GetBlockSize</a></h3>
  433. <pre>func (o *<a href="index.html#Options">Options</a>) GetBlockSize() <a href="../../../../../builtin/index.html#int">int</a></pre>
  434. <h3 id="Options.GetCompactionExpandLimit">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=11850:11907#L391">GetCompactionExpandLimit</a></h3>
  435. <pre>func (o *<a href="index.html#Options">Options</a>) GetCompactionExpandLimit(level <a href="../../../../../builtin/index.html#int">int</a>) <a href="../../../../../builtin/index.html#int">int</a></pre>
  436. <h3 id="Options.GetCompactionGPOverlaps">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=12106:12162#L399">GetCompactionGPOverlaps</a></h3>
  437. <pre>func (o *<a href="index.html#Options">Options</a>) GetCompactionGPOverlaps(level <a href="../../../../../builtin/index.html#int">int</a>) <a href="../../../../../builtin/index.html#int">int</a></pre>
  438. <h3 id="Options.GetCompactionL0Trigger">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=12358:12404#L407">GetCompactionL0Trigger</a></h3>
  439. <pre>func (o *<a href="index.html#Options">Options</a>) GetCompactionL0Trigger() <a href="../../../../../builtin/index.html#int">int</a></pre>
  440. <h3 id="Options.GetCompactionSourceLimit">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=12524:12581#L414">GetCompactionSourceLimit</a></h3>
  441. <pre>func (o *<a href="index.html#Options">Options</a>) GetCompactionSourceLimit(level <a href="../../../../../builtin/index.html#int">int</a>) <a href="../../../../../builtin/index.html#int">int</a></pre>
  442. <h3 id="Options.GetCompactionTableSize">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=12780:12835#L422">GetCompactionTableSize</a></h3>
  443. <pre>func (o *<a href="index.html#Options">Options</a>) GetCompactionTableSize(level <a href="../../../../../builtin/index.html#int">int</a>) <a href="../../../../../builtin/index.html#int">int</a></pre>
  444. <h3 id="Options.GetCompactionTotalSize">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=13407:13464#L443">GetCompactionTotalSize</a></h3>
  445. <pre>func (o *<a href="index.html#Options">Options</a>) GetCompactionTotalSize(level <a href="../../../../../builtin/index.html#int">int</a>) <a href="../../../../../builtin/index.html#int64">int64</a></pre>
  446. <h3 id="Options.GetComparer">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=14038:14087#L464">GetComparer</a></h3>
  447. <pre>func (o *<a href="index.html#Options">Options</a>) GetComparer() <a href="../comparer/index.html">comparer</a>.<a href="../comparer/index.html#Comparer">Comparer</a></pre>
  448. <h3 id="Options.GetCompression">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=14185:14231#L471">GetCompression</a></h3>
  449. <pre>func (o *<a href="index.html#Options">Options</a>) GetCompression() <a href="index.html#Compression">Compression</a></pre>
  450. <h3 id="Options.GetDisableBlockCache">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=14493:14538#L485">GetDisableBlockCache</a></h3>
  451. <pre>func (o *<a href="index.html#Options">Options</a>) GetDisableBlockCache() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  452. <h3 id="Options.GetDisableBufferPool">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=14381:14426#L478">GetDisableBufferPool</a></h3>
  453. <pre>func (o *<a href="index.html#Options">Options</a>) GetDisableBufferPool() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  454. <h3 id="Options.GetDisableCompactionBackoff">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=14605:14657#L492">GetDisableCompactionBackoff</a></h3>
  455. <pre>func (o *<a href="index.html#Options">Options</a>) GetDisableCompactionBackoff() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  456. <h3 id="Options.GetDisableLargeBatchTransaction">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=14731:14787#L499">GetDisableLargeBatchTransaction</a></h3>
  457. <pre>func (o *<a href="index.html#Options">Options</a>) GetDisableLargeBatchTransaction() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  458. <h3 id="Options.GetErrorIfExist">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=14865:14905#L506">GetErrorIfExist</a></h3>
  459. <pre>func (o *<a href="index.html#Options">Options</a>) GetErrorIfExist() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  460. <h3 id="Options.GetErrorIfMissing">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=14967:15009#L513">GetErrorIfMissing</a></h3>
  461. <pre>func (o *<a href="index.html#Options">Options</a>) GetErrorIfMissing() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  462. <h3 id="Options.GetFilter">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=15073:15116#L520">GetFilter</a></h3>
  463. <pre>func (o *<a href="index.html#Options">Options</a>) GetFilter() <a href="../filter/index.html">filter</a>.<a href="../filter/index.html#Filter">Filter</a></pre>
  464. <h3 id="Options.GetIteratorSamplingRate">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=15170:15217#L527">GetIteratorSamplingRate</a></h3>
  465. <pre>func (o *<a href="index.html#Options">Options</a>) GetIteratorSamplingRate() <a href="../../../../../builtin/index.html#int">int</a></pre>
  466. <h3 id="Options.GetNoSync">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=15340:15374#L534">GetNoSync</a></h3>
  467. <pre>func (o *<a href="index.html#Options">Options</a>) GetNoSync() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  468. <h3 id="Options.GetNoWriteMerge">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=15430:15470#L541">GetNoWriteMerge</a></h3>
  469. <pre>func (o *<a href="index.html#Options">Options</a>) GetNoWriteMerge() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  470. <h3 id="Options.GetOpenFilesCacheCapacity">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=15739:15788#L558">GetOpenFilesCacheCapacity</a></h3>
  471. <pre>func (o *<a href="index.html#Options">Options</a>) GetOpenFilesCacheCapacity() <a href="../../../../../builtin/index.html#int">int</a></pre>
  472. <h3 id="Options.GetOpenFilesCacher">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=15532:15577#L548">GetOpenFilesCacher</a></h3>
  473. <pre>func (o *<a href="index.html#Options">Options</a>) GetOpenFilesCacher() <a href="index.html#Cacher">Cacher</a></pre>
  474. <h3 id="Options.GetReadOnly">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=15970:16006#L567">GetReadOnly</a></h3>
  475. <pre>func (o *<a href="index.html#Options">Options</a>) GetReadOnly() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  476. <h3 id="Options.GetStrict">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=16064:16111#L574">GetStrict</a></h3>
  477. <pre>func (o *<a href="index.html#Options">Options</a>) GetStrict(strict <a href="index.html#Strict">Strict</a>) <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  478. <h3 id="Options.GetWriteBuffer">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=16216:16254#L581">GetWriteBuffer</a></h3>
  479. <pre>func (o *<a href="index.html#Options">Options</a>) GetWriteBuffer() <a href="../../../../../builtin/index.html#int">int</a></pre>
  480. <h3 id="Options.GetWriteL0PauseTrigger">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=16350:16396#L588">GetWriteL0PauseTrigger</a></h3>
  481. <pre>func (o *<a href="index.html#Options">Options</a>) GetWriteL0PauseTrigger() <a href="../../../../../builtin/index.html#int">int</a></pre>
  482. <h3 id="Options.GetWriteL0SlowdownTrigger">func (*Options) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=16516:16565#L595">GetWriteL0SlowdownTrigger</a></h3>
  483. <pre>func (o *<a href="index.html#Options">Options</a>) GetWriteL0SlowdownTrigger() <a href="../../../../../builtin/index.html#int">int</a></pre>
  484. <h2 id="ReadOptions">type <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=16821:17245#L604">ReadOptions</a></h2>
  485. <pre>type ReadOptions struct {
  486. <span class="comment">// DontFillCache defines whether block reads for this &#39;read operation&#39;</span>
  487. <span class="comment">// should be cached. If false then the block will be cached. This does</span>
  488. <span class="comment">// not affects already cached block.</span>
  489. <span class="comment">//</span>
  490. <span class="comment">// The default value is false.</span>
  491. DontFillCache <a href="../../../../../builtin/index.html#bool">bool</a>
  492. <span class="comment">// Strict will be OR&#39;ed with global DB &#39;strict level&#39; unless StrictOverride</span>
  493. <span class="comment">// is present. Currently only StrictReader that has effect here.</span>
  494. Strict <a href="index.html#Strict">Strict</a>
  495. }</pre>
  496. <p>
  497. ReadOptions holds the optional parameters for &#39;read operation&#39;. The
  498. &#39;read operation&#39; includes Get, Find and NewIterator.
  499. </p>
  500. <h3 id="ReadOptions.GetDontFillCache">func (*ReadOptions) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=17247:17293#L617">GetDontFillCache</a></h3>
  501. <pre>func (ro *<a href="index.html#ReadOptions">ReadOptions</a>) GetDontFillCache() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  502. <h3 id="ReadOptions.GetStrict">func (*ReadOptions) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=17358:17410#L624">GetStrict</a></h3>
  503. <pre>func (ro *<a href="index.html#ReadOptions">ReadOptions</a>) GetStrict(strict <a href="index.html#Strict">Strict</a>) <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  504. <h2 id="Strict">type <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=2308:2324#L85">Strict</a></h2>
  505. <pre>type Strict <a href="../../../../../builtin/index.html#uint">uint</a></pre>
  506. <p>
  507. Strict is the DB &#39;strict level&#39;.
  508. </p>
  509. <pre>const (
  510. <span class="comment">// If present then a corrupted or invalid chunk or block in manifest</span>
  511. <span class="comment">// journal will cause an error instead of being dropped.</span>
  512. <span class="comment">// This will prevent database with corrupted manifest to be opened.</span>
  513. <span id="StrictManifest">StrictManifest</span> <a href="index.html#Strict">Strict</a> = 1 &lt;&lt; <a href="../../../../../builtin/index.html#iota">iota</a>
  514. <span class="comment">// If present then journal chunk checksum will be verified.</span>
  515. <span id="StrictJournalChecksum">StrictJournalChecksum</span>
  516. <span class="comment">// If present then a corrupted or invalid chunk or block in journal</span>
  517. <span class="comment">// will cause an error instead of being dropped.</span>
  518. <span class="comment">// This will prevent database with corrupted journal to be opened.</span>
  519. <span id="StrictJournal">StrictJournal</span>
  520. <span class="comment">// If present then &#39;sorted table&#39; block checksum will be verified.</span>
  521. <span class="comment">// This has effect on both &#39;read operation&#39; and compaction.</span>
  522. <span id="StrictBlockChecksum">StrictBlockChecksum</span>
  523. <span class="comment">// If present then a corrupted &#39;sorted table&#39; will fails compaction.</span>
  524. <span class="comment">// The database will enter read-only mode.</span>
  525. <span id="StrictCompaction">StrictCompaction</span>
  526. <span class="comment">// If present then a corrupted &#39;sorted table&#39; will halts &#39;read operation&#39;.</span>
  527. <span id="StrictReader">StrictReader</span>
  528. <span class="comment">// If present then leveldb.Recover will drop corrupted &#39;sorted table&#39;.</span>
  529. <span id="StrictRecovery">StrictRecovery</span>
  530. <span class="comment">// This only applicable for ReadOptions, if present then this ReadOptions</span>
  531. <span class="comment">// &#39;strict level&#39; will override global ones.</span>
  532. <span id="StrictOverride">StrictOverride</span>
  533. <span class="comment">// StrictAll enables all strict flags.</span>
  534. <span id="StrictAll">StrictAll</span> = <a href="index.html#StrictManifest">StrictManifest</a> | <a href="index.html#StrictJournalChecksum">StrictJournalChecksum</a> | <a href="index.html#StrictJournal">StrictJournal</a> | <a href="index.html#StrictBlockChecksum">StrictBlockChecksum</a> | <a href="index.html#StrictCompaction">StrictCompaction</a> | <a href="index.html#StrictReader">StrictReader</a> | <a href="index.html#StrictRecovery">StrictRecovery</a>
  535. <span class="comment">// DefaultStrict is the default strict flags. Specify any strict flags</span>
  536. <span class="comment">// will override default strict flags as whole (i.e. not OR&#39;ed).</span>
  537. <span id="DefaultStrict">DefaultStrict</span> = <a href="index.html#StrictJournalChecksum">StrictJournalChecksum</a> | <a href="index.html#StrictBlockChecksum">StrictBlockChecksum</a> | <a href="index.html#StrictCompaction">StrictCompaction</a> | <a href="index.html#StrictReader">StrictReader</a>
  538. <span class="comment">// NoStrict disables all strict flags. Override default strict flags.</span>
  539. <span id="NoStrict">NoStrict</span> = ^<a href="index.html#StrictAll">StrictAll</a>
  540. )</pre>
  541. <h2 id="WriteOptions">type <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=17606:18270#L633">WriteOptions</a></h2>
  542. <pre>type WriteOptions struct {
  543. <span class="comment">// NoWriteMerge allows disabling write merge.</span>
  544. <span class="comment">//</span>
  545. <span class="comment">// The default is false.</span>
  546. NoWriteMerge <a href="../../../../../builtin/index.html#bool">bool</a>
  547. <span class="comment">// Sync is whether to sync underlying writes from the OS buffer cache</span>
  548. <span class="comment">// through to actual disk, if applicable. Setting Sync can result in</span>
  549. <span class="comment">// slower writes.</span>
  550. <span class="comment">//</span>
  551. <span class="comment">// If false, and the machine crashes, then some recent writes may be lost.</span>
  552. <span class="comment">// Note that if it is just the process that crashes (and the machine does</span>
  553. <span class="comment">// not) then no writes will be lost.</span>
  554. <span class="comment">//</span>
  555. <span class="comment">// In other words, Sync being false has the same semantics as a write</span>
  556. <span class="comment">// system call. Sync being true means write followed by fsync.</span>
  557. <span class="comment">//</span>
  558. <span class="comment">// The default value is false.</span>
  559. Sync <a href="../../../../../builtin/index.html#bool">bool</a>
  560. }</pre>
  561. <p>
  562. WriteOptions holds the optional parameters for &#39;write operation&#39;. The
  563. &#39;write operation&#39; includes Write, Put and Delete.
  564. </p>
  565. <h3 id="WriteOptions.GetNoWriteMerge">func (*WriteOptions) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=18272:18318#L654">GetNoWriteMerge</a></h3>
  566. <pre>func (wo *<a href="index.html#WriteOptions">WriteOptions</a>) GetNoWriteMerge() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  567. <h3 id="WriteOptions.GetSync">func (*WriteOptions) <a href="http://localhost:6060/src/github.com/syndtr/goleveldb/leveldb/opt/options.go?s=18382:18420#L661">GetSync</a></h3>
  568. <pre>func (wo *<a href="index.html#WriteOptions">WriteOptions</a>) GetSync() <a href="../../../../../builtin/index.html#bool">bool</a></pre>
  569. <div id="footer">
  570. Build version go1.6.<br>
  571. Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
  572. the content of this page is licensed under the
  573. Creative Commons Attribution 3.0 License,
  574. and code is licensed under a <a href="http://localhost:6060/LICENSE">BSD license</a>.<br>
  575. <a href="http://localhost:6060/doc/tos.html">Terms of Service</a> |
  576. <a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
  577. </div>
  578. </div><!-- .container -->
  579. </div><!-- #page -->
  580. <!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
  581. <script type="text/javascript" src="../../../../../../lib/godoc/jquery.js"></script>
  582. <script type="text/javascript" src="../../../../../../lib/godoc/jquery.treeview.js"></script>
  583. <script type="text/javascript" src="../../../../../../lib/godoc/jquery.treeview.edit.js"></script>
  584. <script type="text/javascript" src="../../../../../../lib/godoc/godocs.js"></script>
  585. </body>
  586. </html>