Skip to content

tommy351/rdb-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rdb-go

Parse Redis RDB dump files. This library is based on redis-rdb-tools.

GitHub tag (latest SemVer) go.dev reference Test codecov

Install

This library can be used as a package.

go get github.com/tommy351/rdb-go

Or as a command line tool.

go get github.com/tommy351/rdb-go/cmd/rdb
rdb path/to/dump.rdb

Usage

Use Parser to iterate over a RDB dump file.

import (
  rdb "github.com/tommy351/rdb-go"
)

parser := NewParser(file)

for {
  data, err := parser.Next()

  if err == io.EOF {
    break
  }

  if err != nil {
    panic(err)
  }

  // ...
}

See examples in the documentation or cmd/rdb/main.go for more details.

License

MIT