Documentation ¶
Index ¶
- Variables
- type LiveLog
- func (t *LiveLog) IsAlive(id string) bool
- func (t *LiveLog) ListIDs() []string
- func (t *LiveLog) NewWriter(id string) (*LiveLogWriter, error)
- func (t *LiveLog) Remove(id string) error
- func (t *LiveLog) Subscribe(id string) (chan []byte, error)
- func (t *LiveLog) Unsubscribe(id string, ch chan []byte)
- type LiveLogWriter
- type LogManager
- func (lm *LogManager) Finalize(id string) (frozenID string, err error)
- func (lm *LogManager) LiveLogIDs() []string
- func (lm *LogManager) NewLiveWriter(idbase string) (string, io.WriteCloser, error)
- func (lm *LogManager) Subscribe(id string) (chan []byte, error)
- func (lm *LogManager) Unsubscribe(id string, ch chan []byte)
- type RotatingLog
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyExists = errors.New("already exists")
View Source
var ErrBadName = errors.New("bad name")
View Source
var ErrFileNotFound = errors.New("file not found")
View Source
var ErrNotFound = errors.New("entry not found")
Functions ¶
This section is empty.
Types ¶
type LiveLog ¶
type LiveLog struct {
// contains filtered or unexported fields
}
func NewLiveLogger ¶
func (*LiveLog) Unsubscribe ¶
type LiveLogWriter ¶
type LiveLogWriter struct {
// contains filtered or unexported fields
}
func (*LiveLogWriter) Close ¶
func (t *LiveLogWriter) Close() error
type LogManager ¶
type LogManager struct {
// contains filtered or unexported fields
}
func NewLogManager ¶
func NewLogManager(dir string, maxLogFiles int) (*LogManager, error)
func (*LogManager) Finalize ¶
func (lm *LogManager) Finalize(id string) (frozenID string, err error)
func (*LogManager) LiveLogIDs ¶
func (lm *LogManager) LiveLogIDs() []string
LiveLogIDs returns the list of IDs of live logs e.g. with writes in progress.
func (*LogManager) NewLiveWriter ¶
func (lm *LogManager) NewLiveWriter(idbase string) (string, io.WriteCloser, error)
NewLiveWriter creates a new live log writer. The ID is the base name of the log file, a transformed ID is returned.
func (*LogManager) Unsubscribe ¶
func (lm *LogManager) Unsubscribe(id string, ch chan []byte)
type RotatingLog ¶
type RotatingLog struct {
// contains filtered or unexported fields
}
func NewRotatingLog ¶
func NewRotatingLog(dir string, maxLogFiles int) *RotatingLog
Click to show internal directories.
Click to hide internal directories.