package config import ( "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/constants" "time" ) func DefaultConfig() Config { raftBindAddr, _ := internal.GetIPAddress() raftBindPort, _ := internal.GetFreePort() return Config{ TLS: false, MTLS: false, CertKeyPairs: make([][]string, 0), ClientCAs: make([]string, 0), Port: 7480, ServerID: "", JoinAddr: "", BindAddr: "localhost", RaftBindAddr: raftBindAddr, RaftBindPort: uint16(raftBindPort), DiscoveryPort: 7946, DataDir: ".", BootstrapCluster: false, AclConfig: "", ForwardCommand: false, RequirePass: false, Password: "", SnapShotThreshold: 1000, SnapshotInterval: 5 * time.Minute, RestoreAOF: false, RestoreSnapshot: false, AOFSyncStrategy: "everysec", MaxMemory: 0, EvictionPolicy: constants.NoEviction, EvictionSample: 20, EvictionInterval: 100 * time.Millisecond, Modules: make([]string, 0), } }