Documentation
¶
Overview ¶
Package filestream provides bounded byte transport shared by native file readers and producers that serialize records incrementally.
Index ¶
Constants ¶
const ( ChunkBytes = 1024 * 1024 MaxRetainedBytes = int64(1<<31-1) * ChunkBytes )
Variables ¶
Functions ¶
func ParseReference ¶
ParseReference validates the transport shape and effective file allowance. Database capabilities separately check ownership, retention and live claims.
Types ¶
type Metadata ¶
Metadata describes fully consumed bytes. It never contains the file body.
type Store ¶
type Store interface {
Retain(context.Context, int64, Producer) (*filepayload.Reference, *Metadata, error)
Open(context.Context, filepayload.Reference, int64) (io.ReadCloser, error)
}
Store is the connector-neutral retained-input boundary. References belong only in encrypted broker traffic and process-local payloads.
type VerifiedReader ¶
type VerifiedReader struct {
// contains filtered or unexported fields
}
VerifiedReader withholds the final read until exact length, EOF and digest agree. Providers must not publish partial input after any read error.
func NewVerifiedReader ¶
func (*VerifiedReader) Complete ¶
func (r *VerifiedReader) Complete() bool
Complete reports whether exact length, EOF and digest have been verified.