Documentation
¶
Index ¶
- type WriterFactory
- func GetLocalWriterFactory(basePath string) WriterFactory
- func GetMemoryWriterFactory() (map[string]*bytes.Buffer, WriterFactory)
- func WithGzip(wf WriterFactory) WriterFactory
- func WrapWFWithPrefix(wf WriterFactory, prefix string) WriterFactory
- func WrapWFWithSuffix(wf WriterFactory, suffix string) WriterFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WriterFactory ¶
type WriterFactory func(path string) (wc io.WriteCloser, err error)
WriterFactory should yield a new WriteCloser under the given path.
func GetLocalWriterFactory ¶
func GetLocalWriterFactory(basePath string) WriterFactory
GetLocalWriterFactory returns a writer factory which creates local files in the basePath. If basePath == "" it defaults to current working dir ("./")
func GetMemoryWriterFactory ¶
func GetMemoryWriterFactory() (map[string]*bytes.Buffer, WriterFactory)
GetMemoryWriterFactory returns a writer factory which is backed by RAM
func WithGzip ¶
func WithGzip(wf WriterFactory) WriterFactory
WrapWFWithGzip adds gzip compresison to the writers that is returned by the underlying WriterFactory
func WrapWFWithPrefix ¶
func WrapWFWithPrefix(wf WriterFactory, prefix string) WriterFactory
WrapWFWithPrefix adds a path prefix to all writes conducted by the writerfactory
func WrapWFWithSuffix ¶ added in v2.1.5
func WrapWFWithSuffix(wf WriterFactory, suffix string) WriterFactory
WrapWFWithSuffix adds a path suffix to all writes conducted by the writerfactory
func (WriterFactory) WithGzip ¶
func (wf WriterFactory) WithGzip() WriterFactory
WithGzip adds gzip compresison to the writers that is returned by the underlying WriterFactory
func (WriterFactory) WithPrefix ¶
func (wf WriterFactory) WithPrefix(prefix string) WriterFactory
WithPrefix adds a path prefix to all writes conducted by the writerfactory
func (WriterFactory) WithSuffix ¶ added in v2.1.5
func (wf WriterFactory) WithSuffix(suffix string) WriterFactory
WithSuffix adds a Suffix to all writes conducted by the writerfactory