mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
* feat: expose BlockKeyCacheSize and enable WriteThrough when bloom filter disabled * import/config: add BatchMaxSize and BatchMaxNodes * config: make BlockKeyCacheSize an OptionalInteger * config: add and wire datastore.WriteThrough option * config: omitempty on BlockKeyCacheSize * changelog: rewrite entry about new options for the datastore * config: add docs for BatchMaxNodes and BatchMaxSize * config: make WriteThrough an optional Flag * changelog: improve description of new datastore/import options * refactor: DefaultWriteThrough as bool * chore: boxo v0.26.0 * docs: config and changelog fixes
29 lines
939 B
Go
29 lines
939 B
Go
package config
|
|
|
|
const (
|
|
DefaultCidVersion = 0
|
|
DefaultUnixFSRawLeaves = false
|
|
DefaultUnixFSChunker = "size-262144"
|
|
DefaultHashFunction = "sha2-256"
|
|
|
|
// DefaultBatchMaxNodes controls the maximum number of nodes in a
|
|
// write-batch. The total size of the batch is limited by
|
|
// BatchMaxnodes and BatchMaxSize.
|
|
DefaultBatchMaxNodes = 128
|
|
// DefaultBatchMaxSize controls the maximum size of a single
|
|
// write-batch. The total size of the batch is limited by
|
|
// BatchMaxnodes and BatchMaxSize.
|
|
DefaultBatchMaxSize = 100 << 20 // 20MiB
|
|
)
|
|
|
|
// Import configures the default options for ingesting data. This affects commands
|
|
// that ingest data, such as 'ipfs add', 'ipfs dag put, 'ipfs block put', 'ipfs files write'.
|
|
type Import struct {
|
|
CidVersion OptionalInteger
|
|
UnixFSRawLeaves Flag
|
|
UnixFSChunker OptionalString
|
|
HashFunction OptionalString
|
|
BatchMaxNodes OptionalInteger
|
|
BatchMaxSize OptionalInteger
|
|
}
|