Documentation
¶
Index ¶
- func FormatLine(line Line) string
- func Run(ctx context.Context, hup chan os.Signal, connected chan struct{}, ...) error
- func Write(ctx context.Context, in chan Line, w io.Writer)
- func WriteBinary(ctx context.Context, in chan reconws.WsMessage, w io.Writer)
- func WsMessageToLine(ctx context.Context, in chan reconws.WsMessage, out chan Line)
- type Line
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLine ¶
FormatLine returns a string representing a Line, ready for writing to file
func Run ¶
func Run(ctx context.Context, hup chan os.Signal, connected chan struct{}, session, token, filename string, binary bool) error
Run connects to the session and handles writing to/from files If a playfilename is present, the connection is closed once the file has finished playing A long delay can be left at the end of the playfile to keep the connection open and logging Connections without a playfilename are kept open indefinitely. interval sets how often the condition check timeout is checked - this has a small effect on CPU usage, and can be set at say 10ms for testing, or 1s or more for usage with long collection periods
func Write ¶
Write writes the line to the file, after formatting, returning when the context is cancelled, or the in channel is closed.
func WriteBinary ¶ added in v0.8.0
Write writes the line to the file, after formatting, returning when the context is cancelled, or the in channel is closed.