Documentation
¶
Overview ¶
Package chunker provides functionalities to create chunks from an io.Reader and also create an io.Reader from chunks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chunker ¶
type Chunker struct {
// contains filtered or unexported fields
}
Chunker converts data read from reader into chunks.
type Data ¶
type Data struct {
// Value carries the context value of data chunk.
Value interface{}
// Data is data chunk.
Data []byte
}
Data represents a data chunk.
type Option ¶
type Option func(*Chunker)
Option is the configuration func of Chunker.
func ChunkSizeOption ¶
ChunkSizeOption returns an option to set chunk size.
func ValueOption ¶
func ValueOption(value interface{}) Option
ValueOption returns an option to set context value to chunks.
Click to show internal directories.
Click to hide internal directories.