Documentation
¶
Overview ¶
Package engine coordinates logfile input with the reusable combat and XP models. It deliberately contains no terminal UI dependencies so another frontend can consume the same replay and live-tail behavior.
Index ¶
- Variables
- func DispatchLiveLine(line string, observers ...LiveLineObserver)
- func Follow(logPath string, startOffset int64, done <-chan struct{}, ...) error
- func FollowWithPoll(logPath string, startOffset int64, done <-chan struct{}, ...) error
- func ProcessLine(line string, tracker *combat.FightTracker, xpSession *xp.Session, ...)
- func ProcessRecord(record eqlog.Record, tracker *combat.FightTracker, xpSession *xp.Session, ...)
- func Replay(logPath string, idleTimeout, back time.Duration, since time.Time, ...) (*combat.FightTracker, *xp.Session, error)
- func ReplayCutoff(logPath string, back time.Duration, since time.Time) (time.Time, error)
- func ReplayCutoffWithCancel(logPath string, back time.Duration, since time.Time, cancel <-chan struct{}) (time.Time, error)
- func ReplayWithProgress(logPath string, idleTimeout, back time.Duration, since time.Time, ...) (*combat.FightTracker, *xp.Session, error)
- type LiveLineObserver
- type ReplayProgress
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReplayCancelled = errors.New("replay cancelled")
Functions ¶
func DispatchLiveLine ¶ added in v0.2.0
func DispatchLiveLine(line string, observers ...LiveLineObserver)
DispatchLiveLine forwards a genuinely new logfile line to optional live-only consumers after combat, XP, Sky, and connected-application processing have completed. Replay and catch-up paths deliberately do not call this helper.
func FollowWithPoll ¶
func FollowWithPoll(logPath string, startOffset int64, done <-chan struct{}, onLine func(string, int64), onPoll func(time.Time)) error
FollowWithPoll follows complete lines and invokes onPoll while waiting at EOF. The callbacks run serially, allowing a caller to maintain mutable parser state without a second synchronization path.
func ProcessLine ¶
func ProcessRecord ¶
func ReplayCutoff ¶
func ReplayCutoffWithCancel ¶
func ReplayWithProgress ¶
Types ¶
type LiveLineObserver ¶ added in v0.2.0
type LiveLineObserver interface {
ObserveLiveLine(string)
}
type ReplayProgress ¶
Click to show internal directories.
Click to hide internal directories.