Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompressOption ¶
type CompressOption func(*CompressWriter)
CompressOption is compress writer option setter function
func CompressionLevel ¶
func CompressionLevel(level int) CompressOption
CompressionLevel set compression level on compress writer
func CompressionType ¶
func CompressionType(t CompressType) CompressOption
CompressionType set compression type on compress writer
type CompressType ¶
type CompressType int
CompressType is the compress writer compression type
const ( CompressGzip CompressType = iota CompressZlib CompressNone )
Compression type allowed
type CompressWriter ¶
CompressWriter will decorate io.Writer in order to compress the data
func NewCompressWriter ¶
func NewCompressWriter(writer io.Writer, options ...CompressOption) *CompressWriter
NewCompressWriter will return a new compress writer
type GelfChunkWriter ¶
type GelfChunkWriter struct {
// contains filtered or unexported fields
}
GelfChunkWriter will decorate io.Writer in order to split the data into chunk
func NewGelfChunkWriter ¶
func NewGelfChunkWriter(writer io.Writer) *GelfChunkWriter
NewGelfChunkWriter will return a new GelfChunkWriter
type Provider ¶
Provider is an io.Writer provider it is used to get an io.Writer Implementation should manage where and how kind of Writer it will return See provider implementations in the provider package.
type RotateIoWriter ¶
type RotateIoWriter struct {
// contains filtered or unexported fields
}
RotateIoWriter will rotate the io.writer when rotate is called it delegates the io.writer creation to the Provider
func NewRotateIoWriter ¶
func NewRotateIoWriter(provider Provider) (*RotateIoWriter, error)
NewRotateIoWriter will create a RotateIoWriter create a new io.Writer that can be changed other the time when Rotate() is called
func (*RotateIoWriter) Rotate ¶
func (w *RotateIoWriter) Rotate() (err error)
Rotate will ask the provider to change the underlying io.writer with a new one
type RotateWriter ¶
RotateWriter is a Writer with extra rotate feature that allows you to change the writer as you need See rotate writer implementations in the writer package.
type TimeRotateWriter ¶
type TimeRotateWriter struct { RotateWriter Interval time.Duration PanicHandler func(error) }
TimeRotateWriter will call RotateWriter::Rotate func over the time with the given interval it delegate the io.writer creation to the Provider
func NewTimeRotateFromProvider ¶
func NewTimeRotateFromProvider(provider Provider, interval time.Duration) (*TimeRotateWriter, error)
NewTimeRotateFromProvider will create a TimeRotateFileWriter that rotate an io.writer over the time with the given interval
func NewTimeRotateWriter ¶
func NewTimeRotateWriter(writer RotateWriter, interval time.Duration) *TimeRotateWriter
NewTimeRotateWriter will create a new TimeRotateWriter it will call the given RotateWriter::Rotate func over the time with the given interval
func (*TimeRotateWriter) Start ¶
func (t *TimeRotateWriter) Start()
Start will start listening the interval ticker rotate is gonna be called for each tick of the ticker