Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ReaderDocs = NewReaderDocs("codec")
ReaderDocs is a static field documentation for input codecs.
var WriterDocs = NewWriterDocs("codec")
Functions ¶
func NewReaderDocs ¶ added in v4.25.0
func NewWriterDocs ¶ added in v4.25.0
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 WriterConfig ¶
type WriterConfig struct {
Append bool
}