Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CarriageReturnWriter ¶
type CarriageReturnWriter struct {
// contains filtered or unexported fields
}
CarriageReturnWriter interprets \r as "move cursor to line start, overwrite". It writes to dst only the final visual state of each line.
func NewCarriageReturnWriter ¶
func NewCarriageReturnWriter(dst io.Writer) *CarriageReturnWriter
NewCarriageReturnWriter creates a new carriage return interpreting writer.
func (*CarriageReturnWriter) Flush ¶
func (w *CarriageReturnWriter) Flush() error
Flush writes any remaining incomplete line (with newline appended).
type FilePath ¶
type FilePath struct {
Log string // autoebiten-{PID}-output.log
Snapshot string // autoebiten-{PID}-snapshot.log
LaunchSock string // autoebiten-{PID}-launch.sock
}
FilePath holds the paths for output capture files.
func DerivePaths ¶
DerivePaths derives output file paths from a socket path. Socket format: {dir}/autoebiten-{PID}.sock Output files: {dir}/autoebiten-{PID}-output.log
{dir}/autoebiten-{PID}-snapshot.log
{dir}/autoebiten-{PID}-launch.sock
type OutputManager ¶
type OutputManager struct {
// contains filtered or unexported fields
}
OutputManager coordinates mutex-protected write, diff, and snapshot operations.
func NewOutputManager ¶
func NewOutputManager(logFile *os.File, outputPath, snapshotPath string) *OutputManager
NewOutputManager creates a new output manager.
func (*OutputManager) DiffAndUpdateSnapshot ¶
func (m *OutputManager) DiffAndUpdateSnapshot() (string, error)
DiffAndUpdateSnapshot generates diff between snapshot and log, then copies log to snapshot. Returns the diff string.