livelog

package
v5.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2016 License: MPL-2.0 Imports: 8 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 {

	// The fully qualified HTTP GET URL where the log will be published.
	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, sslCert, sslKey string) (*LiveLog, error)

New starts a livelog OS process using the executable specified, and returns a *LiveLog. The *LiveLog provides access to the GetURL 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.

sslCert and sslKey should be used to specify the file location of a suitable certificate and key on the local filesystem that can be used for hosting the livelog service over https. If either is an empty string the livelog will resort to running over http transport instead.

Please note the GetURL is for the loopback interface - it is beyond the scope of this library to transform this localhost URL into a URL with a fully qualified hostname using package github.com/taskcluster/stateless-dns-go/hostname since this package can be used independently of the former one.

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