Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Addr string
Dir string
Engine string // "hashdb" or "treedb"
// Authentication. Empty means AUTH is not required.
Auth string
// Batch SET optimization (benchmark-focused).
BatchSets bool
BatchSize int
BatchFlushOnNonset bool
BatchFlushOnNonsetSet bool
// HashDB options.
HashDBShards int
HashDBCompression bool
// TreeDB options.
TreeDBFlushThreshold int64
TreeDBValueLogThreshold int
TreeDBDisableWAL bool
TreeDBRelaxedSync bool
TreeDBJournalLanes int
TreeDBMemtableShards int
// TreeDB compaction defaults (used by COMPACT/BGREWRITEAOF).
CompactDeadRatio float64
CompactMinBytes uint64
CompactMaxSlabs int
CompactMicroBatch int
CompactRotateBeforeWrite bool
CompactCopyBytesPerSec int64
CompactCopyBurstBytes int64
// Optional custom logger. If nil, the default logger is used.
Logf func(format string, args ...any)
// Optional server-level timeout for idle clients.
IdleClose time.Duration
}
Config controls server behavior and engine selection.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements a Redis-compatible server backed by TreeDB or HashDB.
func (*Server) ListenAndServe ¶
ListenAndServe starts serving on the configured address.
Click to show internal directories.
Click to hide internal directories.