livelog

package
v16.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: MPL-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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