log

package
v0.1.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2018 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatLogPath

func FormatLogPath(p string) string

FormatLogPath formats the path the log file.

Types

type Log

type Log struct {
	Name string
	Path string
	// contains filtered or unexported fields
}

Log represents the log of a service. It supports streaming of the contents of the log file by way of implementing the chunker.Chunker interface.

func New

func New(name string) (*Log, error)

New initializes and registers a log for a service.

func (*Log) Close

func (l *Log) Close() error

Close implements io.WriteCloser.

func (*Log) Read

func (l *Log) Read(ctx context.Context) <-chan []byte

Read implements chunker.Chunker.

func (*Log) Write

func (l *Log) Write(p []byte) (n int, err error)

Write implements io.WriteCloser.

Jump to

Keyboard shortcuts

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