Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type FileController
- type FileInfo
- type FileWriterByPeriod
- func (w *FileWriterByPeriod) Close()
- func (w *FileWriterByPeriod) Open(cfg Config)
- func (w *FileWriterByPeriod) Reset(cfg Config)
- func (w *FileWriterByPeriod) ServeHTTP(prefix string) http.Handler
- func (w *FileWriterByPeriod) Watch() (*WatchHandler, error)
- func (w *FileWriterByPeriod) Write(p []byte) (n int, err error)
- type LogPeriod
- type LogPeriodType
- type WatchHandler
- type Watcher
Constants ¶
View Source
const MaxBuffer = 1024 * 500
MaxBuffer buffer最大值
Variables ¶
View Source
var (
ErrorWriterNotOpen = errors.New("writer close")
)
Functions ¶
This section is empty.
Types ¶
type FileController ¶
type FileController struct {
// contains filtered or unexported fields
}
func NewFileController ¶
func NewFileController(config Config) *FileController
type FileWriterByPeriod ¶
type FileWriterByPeriod struct {
// contains filtered or unexported fields
}
FileWriterByPeriod 文件周期写入
func NewFileWriteByPeriod ¶
func NewFileWriteByPeriod(cfg Config) *FileWriterByPeriod
NewFileWriteByPeriod 获取新的FileWriterByPeriod
func (*FileWriterByPeriod) Reset ¶
func (w *FileWriterByPeriod) Reset(cfg Config)
func (*FileWriterByPeriod) ServeHTTP ¶
func (w *FileWriterByPeriod) ServeHTTP(prefix string) http.Handler
func (*FileWriterByPeriod) Watch ¶
func (w *FileWriterByPeriod) Watch() (*WatchHandler, error)
type LogPeriodType ¶
type LogPeriodType int
LogPeriodType 日志周期类型
const ( //PeriodMonth 月 PeriodMonth LogPeriodType = iota //PeriodDay 日 PeriodDay //PeriodHour 时 PeriodHour )
func (LogPeriodType) FormatLayout ¶
func (period LogPeriodType) FormatLayout() string
FormatLayout 格式化
func (LogPeriodType) String ¶
func (period LogPeriodType) String() string
type WatchHandler ¶
type WatchHandler struct { C chan []byte // contains filtered or unexported fields }
func (*WatchHandler) Cancel ¶
func (w *WatchHandler) Cancel()
Click to show internal directories.
Click to hide internal directories.