Open artyom-smirnov opened 1 year ago
This is WIP pull request. Before making it "ready to merge" I want to add maintenance management (repair, sweep, etc) and add some testing. If you have a some time, take a glance. May be you see it somehow different.
In my opinion:
use int
instead of int16
here
type XPBReader struct {
buf []byte
pos int16
}
Bytes() is more idiomatic name for
func (pb *XPBWriter) GetBuffer() []byte
use append()
instead of bytes.Join()
in XPBWriter (with method Reset() object can be reused with existing buffer)
ps what does XPB mean?
what does XPB mean?
Just common name for DPB, RPB.
I think most likely case for XPBReader.Reset is reset with new byte slice for example: https://pkg.go.dev/strings#Reader.Reset, https://pkg.go.dev/bytes#Reader.Reset
Great work!
I don't know much about the service API, but I think the code is good. Test code is also good.
It would be even better if you could include an example in the README if possible, but I think I will merge it without the README when this work is completed.
Low level services wire protocol implementation and wrappers for backup, nbackup, user and trace management