Documentation ¶
Index ¶
- type WriterPool
- func (wp *WriterPool) Close() error
- func (wp *WriterPool) GetStatus() map[string]interface{}
- func (wp *WriterPool) SetTimer2Del(key string, file *os.File, writer *bufio.Writer, mu *sync.Mutex)
- func (wp *WriterPool) SetTimer2Flush(key string, writer *bufio.Writer, mu *sync.Mutex)
- func (wp *WriterPool) WriteStringWithDate(dirName string, fileName string, data string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WriterPool ¶
type WriterPool struct {
// contains filtered or unexported fields
}
func (*WriterPool) Close ¶
func (wp *WriterPool) Close() error
Close is used to close all file interface in WriterPool
func (*WriterPool) GetStatus ¶
func (wp *WriterPool) GetStatus() map[string]interface{}
GetStatus provides a interface to watch the status of writerpool
func (*WriterPool) SetTimer2Del ¶
SetTimer2Del is used to delete unused interface{}
func (*WriterPool) SetTimer2Flush ¶
SetTimer2Flush is used to Flush Data to disk it will make sure that all data can be flushed into file
func (*WriterPool) WriteStringWithDate ¶
func (wp *WriterPool) WriteStringWithDate(dirName string, fileName string, data string) error
WriteStringWithDate will use target date to stroe file The file will store at path/to/data/date/hour.txt
Click to show internal directories.
Click to hide internal directories.