mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
```bash for file in `cat diffys`; do printf '%s\n%s\n' "// Copyright 2021 Molecula Corp. All rights reserved." "$(cat $file)" >$file; done ```
32 lines
531 B
Go
32 lines
531 B
Go
// Copyright 2021 Molecula Corp. All rights reserved.
|
|
package client
|
|
|
|
import (
|
|
"encoding/gob"
|
|
"io"
|
|
)
|
|
|
|
type importLog struct {
|
|
Index string
|
|
Path string
|
|
Shard uint64
|
|
IsRoaring bool
|
|
Timestamp int64 // Unix Nanoseconds
|
|
Data []byte
|
|
}
|
|
|
|
type encoder interface {
|
|
Encode(thing interface{}) error
|
|
}
|
|
|
|
func newImportLogEncoder(w io.Writer) encoder {
|
|
return gob.NewEncoder(w)
|
|
}
|
|
|
|
type decoder interface {
|
|
Decode(thing interface{}) error
|
|
}
|
|
|
|
func newImportLogDecoder(r io.Reader) decoder {
|
|
return gob.NewDecoder(r)
|
|
}
|