Versions in this module Expand all Collapse all v1 v1.0.1 May 28, 2026 Changes in this version + var ErrFileNotOpen = errors.New("filerotate: file not open") v1.0.0 May 28, 2026 Changes in this version + const CmdRotate + type Config struct + CheckInterval time.Duration + ErrorHandler func(error) + FilePath string + LockerFactory func(lockPath string) (Locker, error) + MaxAgeDays int + MaxSizeMB int + NotifierFactory func(errorHandler func(error)) (Notifier, error) + type Locker interface + TryLock func() (bool, error) + Unlock func() error + func NewValkeyLocker(option valkeylock.LockerOption, key string) (Locker, error) + type Notifier interface + Broadcast func(cmd string) error + Close func() error + Connect func() (<-chan string, error) + Serve func() error + func NewJetStreamNotifier(js nats.JetStreamContext, subject string, errorHandler func(error)) Notifier + func NewNATSNotifier(conn *nats.Conn, subject string, errorHandler func(error)) Notifier + func NewValkeyNotifier(client valkey.Client, channel string, errorHandler func(error)) Notifier + type Writer struct + func New(cfg Config) (*Writer, error) + func NewLocal(cfg Config) (*Writer, error) + func (w *Writer) Close() error + func (w *Writer) Write(p []byte) (n int, err error)