Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vadiminshakov committed Oct 14, 2024
1 parent 9614f31 commit 8603f0f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ To create a new WAL instance, specify the directory to store logs and a prefix f
```go
import "github.com/vadiminshakov/gowal"

wal, err := gowal.NewWAL("/path/to/logs", "prefix")
cfg := gowal.Config{
Dir: "./segments",
Prefix: "log_",
SegmentThreshold: segmentThreshold,
MaxSegments: segmentsNumber,
IsInSyncDiskMode: false,
})

wal, err := gowal.NewWAL(cfg)
if err != nil {
log.Fatal(err)
}
Expand Down

0 comments on commit 8603f0f

Please sign in to comment.