Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReaderDocs ¶
NewReaderDocs returns the field documentation for input codecs.
func NewWriterDocs ¶
NewWriterDocs returns the field documentation for writer codecs.
Types ¶
type Reader ¶
type Reader interface { Next(context.Context) ([]*message.Part, ReaderAckFn, error) Close(context.Context) error }
Reader is a codec type that reads message parts from a source.
type ReaderAckFn ¶
ReaderAckFn is a function provided to a reader codec that it should call once the underlying io.ReadCloser is fully consumed.
type ReaderConfig ¶
type ReaderConfig struct {
MaxScanTokenSize int
}
ReaderConfig is a general configuration struct that covers all reader codecs.
func NewReaderConfig ¶
func NewReaderConfig() ReaderConfig
NewReaderConfig creates a reader configuration with default values.
type ReaderConstructor ¶
type ReaderConstructor func(string, io.ReadCloser, ReaderAckFn) (Reader, error)
ReaderConstructor creates a reader from a filename, an io.ReadCloser and an ack func which is called by the reader once the io.ReadCloser is finished with. The filename can be empty and is usually ignored, but might be necessary for certain codecs.
func GetReader ¶
func GetReader(codec string, conf ReaderConfig) (ReaderConstructor, error)
GetReader returns a constructor that creates reader codecs.
type SuffixFn ¶
SuffixFn is a function which should be called by codec writers to determine when a custom suffix must be emitted by the writer codec.
type WriterConfig ¶
type WriterConfig struct {
Append bool
}
WriterConfig is a general configuration struct that covers all writer codecs.