FileWriterByPeriod 文件周期写入
| 25 | |
| 26 | //FileWriterByPeriod 文件周期写入 |
| 27 | type FileWriterByPeriod struct { |
| 28 | wC chan *bytes.Buffer |
| 29 | dir string |
| 30 | file string |
| 31 | period LogPeriod |
| 32 | enable bool |
| 33 | cancelFunc context.CancelFunc |
| 34 | locker sync.Mutex |
| 35 | wg sync.WaitGroup |
| 36 | expire time.Duration |
| 37 | } |
| 38 | |
| 39 | //NewFileWriteBytePeriod 获取新的FileWriterByPeriod |
| 40 | func NewFileWriteBytePeriod() *FileWriterByPeriod { |
nothing calls this directly
no outgoing calls
no test coverage detected