Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeStreamOpen = "gonimbus.stream.open.v1" TypeStreamChunk = "gonimbus.stream.chunk.v1" TypeStreamClose = "gonimbus.stream.close.v1" )
View Source
const DefaultMaxLineBytes = 1 << 20
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkEvent ¶
type ChunkEvent struct {
Header Chunk
Body io.ReadCloser
}
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func (*Decoder) SetMaxLineBytes ¶
type Open ¶
type Open struct {
StreamID string `json:"stream_id"`
URI string `json:"uri"`
DestKey string `json:"dest_key,omitempty"`
ETag string `json:"etag,omitempty"`
Size *int64 `json:"size,omitempty"`
LastModified *time.Time `json:"last_modified,omitempty"`
ContentType string `json:"content_type,omitempty"`
Encoding string `json:"content_encoding,omitempty"`
Range *ByteRange `json:"range,omitempty"`
}
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer emits a mixed-framing stream: - JSONL control-plane records (output.Record) terminated by '\n' - for chunk records, exactly N raw bytes follow immediately
Writer is safe for concurrent use.
func (*Writer) WriteChunk ¶
WriteChunk writes a chunk header record and then copies exactly hdr.NBytes bytes from body.
Caller may pass an io.Reader that yields fewer bytes; this will be surfaced as io.ErrUnexpectedEOF.
func (*Writer) WriteClose ¶
Click to show internal directories.
Click to hide internal directories.