-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.go
More file actions
28 lines (25 loc) · 743 Bytes
/
config.go
File metadata and controls
28 lines (25 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package enstore
const (
// ConfigfilePath is the default config file path
ConfigfilePath string = "config.json"
// DefaultBlockSize is the default block size (5 MB)
DefaultBlockSize int = 5242880 // 5 MB
// DefaultChunkSize is the default chunk size (512 bytes)
DefaultChunkSize int = 512 // 512 bytes
// DefaultIndexfile is the default index file path
DefaultIndexfile string = "index"
)
// Config is the basic configuration for enstore
type Config struct {
BlockSize int
ChunkSize int
IndexFile string
}
// NewDefaultConfig returns a pointer to a new Config with default values
func NewDefaultConfig() *Config {
return &Config{
BlockSize: DefaultBlockSize,
ChunkSize: DefaultChunkSize,
IndexFile: DefaultIndexfile,
}
}