github.com/TeaOSLab/EdgeNode@v1.3.8/internal/utils/bfs/blocks_file_options.go (about)

     1  // Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
     2  
     3  package bfs
     4  
     5  type BlockFileOptions struct {
     6  	BytesPerSync int64
     7  }
     8  
     9  func (this *BlockFileOptions) EnsureDefaults() {
    10  	if this.BytesPerSync <= 0 {
    11  		this.BytesPerSync = 1 << 20
    12  	}
    13  }
    14  
    15  var DefaultBlockFileOptions = &BlockFileOptions{
    16  	BytesPerSync: 1 << 20,
    17  }