GitHub - stym06/rebuf: Rebuf is a library that can be used as a WAL which can be used for logging and later replaying the data bytes during downstream service failure
rebuf is a Golang implementation of WAL (Write Ahead||After Logging) which can also be used to log data bytes during a downstream service issue which can later be replayed on-demandexample.go
rebufOptions := &rebuf.RebufOptions{
LogDir: "/Users/data",
MaxLogSize: 50,
MaxSegments: 2,
}
//Init Rebuf
rebuf, err := rebuf.Init(rebufOptions)
if err != nil {
fmt.Println("Error during Rebuf creation: " + err.Error())
}
//Write Bytes
err = rebuf.Write([]byte("Hello world"))
//Replay
rebuf.Replay(wr...
Read more at github.com