livelog

package
v28.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package livelog provides a simple wrapper around the livelog executable. After the generic worker is refactored into engines, plugins and a runtime, livelog will be a plugin instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LiveLog

type LiveLog struct {
	PUTPort uint16
	GETPort uint16
	// The localhost URL where GET requests will get a streaming copy of the log
	GetURL string

	// The io.WriteCloser to write your log to
	LogWriter io.WriteCloser
	// contains filtered or unexported fields
}

LiveLog provides access to a livelog process running on the OS. Use New(liveLogExecutable string) to start a new livelog instance.

func New

func New(liveLogExecutable string, putPort, getPort uint16) (*LiveLog, error)

New starts a livelog OS process using the executable specified, and returns a *LiveLog. The *LiveLog provides an HTTP service on the getPort which can be used to tail the log by multiple consumers in parallel, together with an io.WriteCloser where the logs should be written to. It is envisanged that the io.WriteCloser is passed on to the executing process.

func (*LiveLog) Terminate

func (l *LiveLog) Terminate() error

Terminate will close the log writer, and then kill the livelog system process.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL