Documentation
¶
Overview ¶
Package sidecar streams checked records through bounded scratch.
Index ¶
- Constants
- func CheckOrdinalFooter(footer []byte, binding [32]byte, count int, checksum uint32) error
- func OrdinalBody(raw []byte, binding [32]byte, count int) ([]byte, error)
- func Write(ctx context.Context, b backend.Backend, key string, header []byte, ...) error
- func WriteChecked(ctx context.Context, b backend.Backend, key string, header []byte, ...) error
- type OrdinalWriter
Constants ¶
OrdinalFooterBytes includes the manifest binding, record count, and checksum.
const ScratchBytes = 32 << 10
ScratchBytes bounds the encoder buffer shared by sequential sidecar writes.
Variables ¶
This section is empty.
Functions ¶
func CheckOrdinalFooter ¶
CheckOrdinalFooter validates the expected binding, record count, and checksum.
func OrdinalBody ¶
OrdinalBody validates a complete sidecar and returns its encoded records.
Types ¶
type OrdinalWriter ¶
type OrdinalWriter struct {
// contains filtered or unexported fields
}
OrdinalWriter streams records whose order is supplied by the part's series index.
func OpenOrdinalWriter ¶
func OpenOrdinalWriter(ctx context.Context, b backend.Backend, key string, magic uint32) (*OrdinalWriter, error)
OpenOrdinalWriter starts a deferred sidecar with the given format tag.
func (*OrdinalWriter) Abort ¶
func (w *OrdinalWriter) Abort()
Abort releases the buffer and discards any uncommitted output.